[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: lists with nil play nice for Lua 5.2
- From: Patrick Donnelly <batrick@...>
- Date: Mon, 30 Jul 2007 09:15:46 -0600
> 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 it
> would be useful for other problems, like returning the norm of a
> vector).
http://www.lua.org/manual/5.1/manual.html#2.8
__len??
-Patrick Donnelly
"One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say."
-Will Durant