lua-users home
lua-l archive

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


Alen Ladavac wrote:
Why not getting rid of false altogether?

I guess because nil and false just aren't the same thing with different types. For comparison purposes they pretty much serve the same function, but as table values (and keys!) they're semantically very different things, not just differently typed.

(I use 'false' values in tables where a 'nil's implicit
removal of the corresponding key would not mean what I want -
particularly in configuration management where setting
an option to false is different from setting it to nil,
where the latter case simply says that this configuration
option doesn't exist and is therefore undefined/defaulted.)

--adam