lua-users home
lua-l archive

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


On Thu, Jun 29, 2017 at 2:09 PM,  <temp212@gorodok.net> wrote:
> BUT, the problem is there is no way to set it as metatable to newly created
> tables automatically, to make code like {x,y,z} * {1,0,1} + 5 working.

There is no better way to do this currently. The approach I'd
recommend would be to have a function that takes one table parameter,
sets the metatable and returns it, and use it like a table-literal
prefix: T{x,y,z} * T{1,0,1} + 5

-Duncan