lua-users home
lua-l archive

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


On Fri, 30 Jun 2017 08:52:13 +0100
 Javier Guerra Giraldez <javier@guerrag.com> wrote:
On 29 June 2017 at 18:54,  <tobias@justdreams.de> wrote:
Quoting temp212@gorodok.net:

Thanks Javier, this would work, but additional letter before table still
looks a little bit ugly to me, although not as ugly as my patch that from
internals gets the default metatable using C api.

While it might be conceived as ugly it is also explicit.

right.  remember that it's possible that you'd still want "plain" Lua
tables in your program.  the factory function can be seen as a "type
prefix", not too different to the '0x' used before hexadecimal
numbers.


The idea was not to break or replace anything, just add possibility to make arithmetics on equal sized vectors and numbers "Mathematica style". 'plain' tables would work as usual, by default there is just no arithmetics for tables without metatable.