lua-users home
lua-l archive

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


On Thu, Apr 10, 2014 at 9:27 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> No, it means just what I said at the beginning. Term-by-term indexing.
> Vararg maps to variable return list. In effect a fallback metamethod
> if you have failed to provide one yourself.

Ah, I should read more carefully, and sorry to use the F-word so late
in the programming century. But the numerical guys will tend to read
it as multiple-indexing.

It's a little awkward with string keys : t["one","two"], but not awful.

Given f() that returns multiple values, is t[f()] intended to access
all those values? Because then we have the classic
propagation-of-multiple-values problem that gave you such grief with
string.gsub.

I think I'd need to see more elaborate code snippets to decide if this
is useful, or just cute...