lua-users home
lua-l archive

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


I'd prefer if constructs like this were added instead (with their own opcodes):
#... for select("#", ...) and ...[i] for (select(i, ...))

Of course, I'd rather see something more elegant like adding immutable tuples and implementing ... as a tuple, but that's far more work.

2007/8/30, David Kastrup <dak@gnu.org>:

On a different tack: maybe one could optimize usage like

   for i=1,#{...} do something(({...})[i])

to not actually create tables in order not to have to use select at
all?  That would make for more consistency in a different area.
Incidentally, {...}[i] is not allowed.

--
David Kastrup