lua-users home
lua-l archive

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

2009/11/5 Fabien <>:
> In metalua:
> -- Metalua extension --
> -{ block:
> x = setmetatable({ }, MT)
> -- Use the metatable --
> print (x[1])
> print (x[1,2])
> print (x[1,2,3])
> It generates normal code for 1-dimension indices; if there are several
> indices, it directly calls the __index metamethod with all the indices.
>    -- Fabien

Thank you very much Fabien, that looks great. I really need to improve
my knowledge of Metalua since it is an excellent tool.

The only problem is that if I adopt this solution I will be forced to
run GSL shell through Metalua instead of Lua. This will add a
significant level of complexity that will be, at the end, unjustified.

So, I'm going to test your solution, it is a really smart proposition,
but still I would like to adopt the option of changing Lua itself.

So, I still need the help of the Lua hackers :-)