lua-users home
lua-l archive

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


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