[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Next Version of Lua?
- From: mark@...
- Date: Wed, 10 Jun 2009 13:08:46 -0700
Following up on my earlier post, having to write:
for v in iter( ... ) do
-- process varargs
Actually defeats some of the point since it must necessarily allocate storage proportional to the varargs since I might just as easily write:
SomeGlobal = iter( ... )
(The point to "for v in ..." being to avoid that allocation and just use the existing values on the stack.)
Still it would be good to provide better support for ... in more contexts barring conflicts with existing syntax so that the quadratic tendencies of select could be minimized. One can do some of that now -- e.g., there's nothing stopping one from writing a version of iter -- but it would be good to standardize the mechanisms.