lua-users home
lua-l archive

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


Though I shouldn't, I can't resist weighing in on this thread.
The purpose of nill is to be a unique value that cannot appear 
in any table or list.  If you want a unique value for some other purpose.
Lua provides you a trivial way to make one:

  hole = {}

  l = {1, hole, 3, 'beeblebrox'}

Of course, you must do the extra work of explaining and documenting
this value.  Perhaps Lua 5.2 can address the policy disorder by
providing a value 'table.hole' whose sole purpose is to be distinct
from every other value (including nil) :-)



Norman