lua-users home
lua-l archive

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

2009/11/6 Alexander Gladysh <>:
>> That said, given sufficient demand, adding a vector/matrix library
>> is not out of the question. The compiler would be able to
>> eliminate the intermediate object creation for 'm[i][j] = val'.
>> The interpreter, too, with some tricks. So, if you can get over
>> the syntax ...
> Ugh. On the rights of the voice from the crowd:
> I'm not against the possibility that LuaJIT would extend Lua syntax.
> However, I ask for a clear option to disable any such extensions on
> all levels -- compiler, interpreter whatever ("run as strict Lua, as
> defined by the Lua Programming Manual").
> If I'm to adopt LuaJIT for production, this is the critical feature.

Either I'm mistaken, or the email you quote didn't advocate any syntax

As I understand it Mike was talking of the possibility of LuaJIT
having a built-in matrix library (require "matrix") so you could
create a matrix object (m =, y)) and reference any
position (m[x][y]) efficiently without the overhead one incurs trying
to replicate this in standard Lua. It would be simple to make such a
library for standard Lua too (same API, but without the internal
optimisations possible in LuaJIT) - code examples have already been
given in this thread.