lua-users home
lua-l archive

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


Louis Mamakos <louie@transsys.com> wrote:
>
> Is the mechanism thought to be limited to exactly 3 arguments to the
> metamethod?  Could it be generalized to 2 or more "subscripts"?

Another reason this is a good question is that the current metamethod
implementation is tuned for overloading operators with a limited number of
arguments. It's not a horrible problem because the compiler knows
statically (from the syntax) when a multi-argument index is happening so
it could be compiled to splice-specific byte code.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Hebrides, Bailey: Cyclonic becoming northeast 5 to 7, occasionally gale 8.
Rough. Rain or snow. Good, occasionally very poor.