[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: select("#", ...) idiom
- From: Michael Roth <mroth@...>
- Date: Wed, 14 Sep 2005 23:02:01 +0200
Ben Sunshine-Hill wrote:
> Why not simply tweak the compiler so that it recognizes #{...} as a
> special case, and evaluates the expression without constructing a
> table?
But then then the results of the new length operator will behave
differently in these two cases:
function a(...)
print(#{...})
end
function b(...)
local t = {...}
print(#t)
end
a(nil) ---> 1
b(nil) ---> 0
Attachment:
signature.asc
Description: OpenPGP digital signature