[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: sunday afternoon whishlist
- From: Arseny Vakhrushev <arseny.vakhrushev@...>
- Date: Tue, 11 May 2010 22:09:00 +0400
>> And there are no plans to change varargs in 5.2.
Thanks to heaven. I don't see where '...' construct is not well suited inside the language right now
unlike 'vararg' in Lua 5.0.
>> -- Roberto
> I'm sure I've heard it repeatedly stated that vararg would change in
> 5.2 in this very list. Also:
>> function f(x,...) print(#...) end
>> f(1,2,3,4)
> stdin:1: attempt to get length of a number value
> It doesn't work, because "#..." expands to "#2,3,4" which doesn't make sense.
Not quite correct. '#' expects exactly one parameter, so '...' is adjusted to one result
which is a number (that's a separate part of the story).