lua-users home
lua-l archive

Re: lua-5.1-alpha: length operator on tables (arrays) and nil

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


I don't see why ... is better than arg. It introduces inconsistencies, new compound structures, etc. with no immediately obvious advantages. What's so good about the change?
A function invocation in 5.0.2 with 5 parameters of
 function f(...)
 -- use arg table here
 end
is between 5 to 6 times slower than the same invocation in 5.1 of
 local select = select
 function f(...)
 local n = select("#", ...)
 -- use ... and n here
 end
So, that seems to be good about this change... :-)
--
Wim

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