lua-users home
lua-l archive

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


Axel Kittenberger <axkibe@gmail.com> writes:

> Indeed, for my taste and coder-newbie-friendliness, it would be nice
> if paranoid lists would be default

Are we still talking about the language or about the mailing lists?

The language does not _have_ lists.  It has tables.  You can use them
for emulating various other data structures with their own invariants.
Violate the respective invariants, and the emulation suffers.  If you
desperately want to make it impossible to violate the invariants, use
appropriate metatables for each emulation prohibiting the violation of
the respective invariant.

But there is little point in reducing the efficiency and versatility of
the _only_ underlying data structure Lua has.

-- 
David Kastrup