lua-users home
lua-l archive

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

Patrick Donnelly  wrote: 
> > In that context the # operator is not well defined. I see two good
> > (though not perfect) solutions: either make the table # operator
> > deterministic (for example return the biggest integer key), or allow
> > users to override the # operator (that's my prefered solution, since
> > would be useful for other problems, like returning the norm of a
> > vector).
> __len??

I thought so initially, but it's not overridable for tables :-)