lua-users home
lua-l archive

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


Hiya,

I absolutely agree with nil and false being two different beasts, and
I use them for different purposes, and so does lua. false is a value,
whereas nil is not. I would not want to copy the php mess, where

0 == "0" == "" == false == undef == any string consisting of only a
sequence of zeros...

They f***ed up so badly with this that they even had to introduce a
new comparison operator to clean up the mess :-( Threating nil akin to
false in some contexts, as lua does, is a compromise between a clean
and a comfortable handling of the nil value. If you're confused by
this, the correct solution is to not use nil when you mean false, and
vice versa.

just my 2 cents,

Gunnar