lua-users home
lua-l archive

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


| The extra bytecode size may be an issue in some situations, but maybe we
| could look forward to some simple compiler optimizations in this area?  In
| any case I really don't think a few "if nil's" per source file are going to
| affect any script's speed... it's negligible compared to global name lookups
| and the like.
| I was replying to the original question about commenting out code.
| Controlling assertions is another issue.

Point taken. Its a bit of a pain "if nil"-ing some code out and then having to
comment it out as well to avoid it being in the release build. I mentioned
assertions as the C preprocessor solves both of these problems (ie. C macros can
be used). The Lua preprocessor was removed in v4, I cant remember the reason.
Perhaps a simple preprocessor would be the answer. It could be written in Lua
and distributed with the source, perhaps as an optional wrapper to dofile.

Nick