[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: table insertion [was: Lua 5.1 (work2) now available]
- From: "Adam D. Moss" <adam@...>
- Date: Thu, 04 Nov 2004 15:20:56 +0000
Roberto Ierusalimschy wrote:
I have a proposal for a new operator (after all these years): "*t" would
return the "size" of table t.
Ohh, sorry to piggyback a semi-related request on that post,
but I like that idea and wanted to make an additional suggestion:
please consider making the action of '*t' overridable with a
metamethod. While this might conceivably permit custom getn-like
behaviour, I mainly think that a unary-* would be a fairly
intuitive syntax for some other things (particularly a copy-by-
value for an object).