lua-users home
lua-l archive

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


On Tue, May 25, 2010 at 3:35 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> Which is precisely the mad urge which causes all the problems in the
> first place.

Which was of course a silly thing to say in a serious conversation;
there is currently no way to avoid nils in tables, otherwise the
useful {n=select('#',...),...} would not work correctly.  But is it
not possible to have a sentinel non-nil value which otherwise behaves
exactly like nil? Call it Nil, or none;  type(none)=='nil'.

This makes array semantics more sensible at the cost of introducing
another value.

steve d.