lua-users home
lua-l archive

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


On Wed, Feb 16, 2011 at 6:29 PM, Philippe Lhoste <PhiLho@gmx.net> wrote:
> It would be nice, perhaps, if Lua had a way to define true, efficient
> constants.
> (Yes, that's another bag of worm. Perhaps if someone want to comment on my
> remark, a new thread should be started...)

Sounds like a job for the token-filter patch ... it seems doable in
LuaJIT, pretty similar code.. Then one can do like C (another fine
language with no constants) and preprocess the problem away. I suspect
that LuaMacro can help to bridge the divide [1]

steve d.
1. I know, we were all told that the C preprocessor was a bad idea, no
lexical scope, and so forth. But macros are no worse than globals
really, and strong religious feelings should be kept out of
engineering ;)