lua-users home
lua-l archive

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


> If you enable LUA_NILINTABLES (as explain in detail in a new thread),
> there is another value of type nil, call it 'empty'. You can't tell
> the difference between the values 'nil' and 'empty' at the level of
> the API, let alone in Lua.

I don't think these implementation details help this discussion, on the
contrary.

The implementation could be completely different, for instance an extra
field in each table entry telling whether it is empty or not. Actually,
this second implementation gives a much better mental model of the
semantics then the real implementation, but it would be more expensive.

-- Roberto