[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: constants?
- From: "Nick Trout" <nick@...>
- Date: Tue, 14 Oct 2003 16:35:46 -0700
> -----Original Message-----
> From: RLake@oxfam.org.pe [mailto:RLake@oxfam.org.pe]
> Sent: Tuesday, October 14, 2003 12:50 PM
> To: Lua list
> Subject: RE: constants?
> > I know they're not strictly necessary, but you should get smaller,
> > faster Lua VM code if you use a pre-processor. The variable names
> > not stored, and they don't have to be looked up in a table (global
> > user) to find the value.
> You can achieve exactly the same result by using local variables.
I forgot, they are not quite similar because the values are constant.
Unless you use some metamethod cleverness (mmm can you do that with
locals?) to implement read only variables you can alter locals values