[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Different shades of false
- From: "Adam D. Moss" <adam@...>
- Date: Thu, 02 Mar 2006 16:59:31 +0000
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