[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: select("#", ...) idiom
- From: Lucas Ackerman <glitch@...>
- Date: Wed, 14 Sep 2005 12:52:53 -0400
I dislike the suddenly-popular select( "#", ... ) idiom because it is
uninformative (no selection is made), complicates select with unrelated
behavior, and misappropriates the # symbol. Of everything 5.1-related on
the Lua list, this is the ONLY item I've had to look up in the docs to
grok! Could this behavior be externalized? I can only imagine that any
reasonable coder would define
function count(...) return select("#", ...) end
or such with a useful name (slots, args, last, etc), if this remains in
the standard library.
Lua has many beautiful idioms, please don't spread this ugly one!
-Lucas
- Follow-Ups:
- Re: select("#", ...) idiom, PA
- Re: select("#", ...) idiom, Shannon Stewman
- Re: select("#", ...) idiom, Doug Currie
- Re: select("#", ...) idiom, Michael Roth
- Re: select("#", ...) idiom, Mildred