[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: new "empty" value/type in Lua?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 28 Jun 2013 14:22:50 +0200
2013/6/28 Dirk Laurie <dirk.laurie@gmail.com>:
> 2013/6/28 Tim Hill <drtimhill@gmail.com>:
>
>> But I stand by my point; it's an oddity of the language that I cannot
>> use nil to mark an array entry as empty, and my suggestion was to fix
>> that in a clean simple manner. Nothing more, nothing less.
>
> It's a feature of the language, call it an oddity if you prefer, that
> unused array items quite likely do not occupy any actual storage. The
> Lua `nil` fits in very nicely with that. It is not intended to mark an
> array entry as empty. The ways to do so are domain-specific because the
> necessity to so is domain-specific.
>
> I ask again: should `empty` be a valid table key?