lua-users home
lua-l archive

Re: ... can't be upvalue?

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


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> Is there a rationale for this behavior, or does it just happen to
>> be this way?
>
> http://lua-users.org/lists/lua-l/2007-03/msg00249.html
Well, this does not exactly give a rationale. It just says that this
is unlikely to change for what appears to be technical reasons.
Whether those should win over usage consistency is a different
question in my opinion.
As it is, one has to change
function()
 for i=1,select('#', ...) do something(select(i, ...))
to
local args={...}
function()
 for i,x in ipairs(args) do something(x)
and this seems somewhat unelegant.
-- 
David Kastrup

AltStyle によって変換されたページ (->オリジナル) /