lua-users home
lua-l archive

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


Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On Mon, Apr 2, 2012 at 10:02 AM, Tony Finch <dot@dotat.at> wrote:
> > the compiler knows
> > statically (from the syntax) when a multi-argument index is happening
>
> what should happen on  t[unpack({1,2})]   ?

An excellent point. It might be possible to handle efficiently but I'm not
certain. It's also rather weird that a function call in that location
could lead to a different metamethod being invoked depending on the number
of return values.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Tyne, Dogger: Cyclonic, mainly east 4 or 5, becoming northeast 6 to gale 8,
perhaps severe gale 9 later. Moderate becoming rough or very rough. Rain, snow
later. Moderate or good, occasionally very poor later.