lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> -----Original Message-----
> From: []
> 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