lua-users home
lua-l archive

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

People have been asking for more comments in the source code. I wouldn't necessarily agree, but there could be some things done to implicitly comment the behaviour.

- use of 'tmp' for obviously temporary value (i.e. 'tonumber' and 'isnumber' use 'n' for such)
- use of '_bool' or 'int_bool' where 'int' is used as a boolean

Lua has a lot of the latter, and clearly seeing it's supposed to be a 0/non-0 would be meaningful. When compiled in C++, it could simply be compiled as 'bool'.