lua-users home
lua-l archive

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


> [The "is nil present in a table" problem]

I don't think that's an adequate name for the problem.  Nil should not be
present in tables.  Nil is what you assign to a key to remove it from a
table.  The problem is that Lua uses nil to mean false, so if you assign the
result of a boolean expression to a key you might obliterate that key.

We've had a proposal on the table for dealing with this for a while.  Edgar
T. even made a patch for 4.0.  Is it worth some attention?
(http://lua-users.org/wiki/BooleanTypeProposal)

-John