[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Size of a non numerical indexed table
- From: Rici Lake <lua@...>
- Date: Thu, 1 Sep 2005 11:47:43 -0500
On 1-Sep-05, at 11:37 AM, Mark Hamburg wrote:
That works. It's still a reasonably low proportionality constant and
most
uses of a foreach form would have required generating a closure.
I do recall some limit on the number of upvalues a C function can
have. How
does this compare to the limits on the number of arguments a function
can
take -- i.e., can we fit all of ... into individual upvalues?
Not if ... had a lot of elements. I think eachi would have to use two
different strategies: if called with more than maxupval arguments, it
would have to create a table and use a different next function.
As an aside, I would find this form useful for other things than ...
Dumb example but illustrative example:
for _, word in eachi("foo", "bar", "glitch") do