[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[4]: select("#", ...) idiom
- From: Doug Currie <doug.currie@...>
- Date: Thu, 15 Sep 2005 11:28:58 -0400
Thursday, September 15, 2005, 9:19:54 AM, Rici wrote:
> While I'm not particularly fond of select("#", ...), I really don't
> like magic #... There is enough magic in ... as it is :) # is a
> prefix operator like - and not, and it should behave exactly the
> same way as they do.
The #... syntax seems to be misleading to those who know Lua well, as
well as excessively magical (especially if #... and # ... mean
different things). So, I'm backing off!
> In any event, there are few use cases for finding the argument count which
> do not involve iterating over the arguments; I would far rather have:
> for i, arg in ieach(...) do process(arg) end
> than
> for i = 1, select('#', ...) do process((select(i, ...))) end
> or any variation on that theme, including #...
That's a good suggestion. Thanks.
e
- References:
- Re: select("#", ...) idiom, Shannon Stewman
- Re: select("#", ...) idiom, Roberto Ierusalimschy
- Re[2]: select("#", ...) idiom, Doug Currie
- Re: select("#", ...) idiom, Wim Couwenberg
- Re[2]: select("#", ...) idiom, Doug Currie
- Re: Re[2]: select("#", ...) idiom, Rici Lake