lua-users home
lua-l archive

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


If we want to do #, insert and remove for linear lists only, we don't
need the current # definition for [n]~=nil and [n+1]==nil at all,
which does imply usage on non-lists. Since for lists its trivial and I
dare say possibly even more efficient to keep their length them self.

> I don't support Axel's idea to force the user to define __len.
> Maybe have a bit more in the reference manual about table functions
> being well-behaved only for annotated lists.  People do read the
> reference manual, don't they?  Surely? :-?

Might, might not be. If we expect more and more from the user - can I
then please also have the += and ?: operators?