lua-users home
lua-l archive

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


2016-07-28 1:14 GMT+08:00 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>> > because you doesn't really *use* the vararg, try this:
>> >
>> > function f(a,b,...) for k=-4,4 do print(k,debug.getlocal(1,k)) end
>> > local _ = ... end
>> > f(10,20,30,40,50)
>>
>> Thanks to this insight of yours, I have changed the subject line.
>
> We changed that because main chunks are always vararg, but seldom use
> varargs. But main chunks also are seldom called multiple times, so maybe
> optimizing their calls is not relevant, after all.
>
> -- Roberto
>

So best way is to document it? I just think this optimize somewhat
real reasonable.

-- 
regards,
Xavier Wang.