lua-users home
lua-l archive

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


> > 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