[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lists with nil play nice for Lua 5.2
- From: Norman Ramsey <nr@...>
- Date: Sun, 29 Jul 2007 16:12:50 -0400
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