lua-users home
lua-l archive

Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack)

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


On Wed, Jun 22, 2016 at 1:45 AM, Soni L. <fakedme@gmail.com> wrote:
> For me, a proper array in Lua would be an array of pointers. This inculdes
> nil aka null pointers.
But if I want this, I know what to do - use the placeholder pattern
and define a unique value 'null'. For arrays of objects, `false` is a
convenient placeholder because of its falsiness. When interoperating
with JSON this issue arises, and such packages usually define
'json.null' for this purpose. I frankly don't see the problem. By
analogy with wave/particle theory, the 'classical' limits of a Lua
table are hashmaps and arrays. We know the actual beast is more than
that.

AltStyle によって変換されたページ (->オリジナル) /