lua-users home
lua-l archive

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


I am experimenting with the idea of adding optional static typing to
Lua. The project is very young (only started beginning of the year) so
the ideas are all in flux. But the overall goal of the project is
described here:

I wanted to wait until I had a proof of concept before sharing this
here. But on the other hand sharing early will allow me to get help
and advice from experts on this list - especially Lua authors. So in
the end decided to share earlier than planned.

Currently the status is that local variables can be optionally typed
as 'int' or 'double'. This triggers dedicated op codes for certain
arithmetic operations. However, there are many gaps and bugs - e.g.
variables are still initialized to nil. I am running the Lua 5.3 tests
to verify backward compatibility - i.e. if no types are specified then
it should work as standard Lua.

I would welcome feedback. Also the questions I have been asking here -
this was the context for them.

As I understand more about the internals of Lua - I intend to
document. I will update the No Frills VM guide for Lua as well as add
more information. As a starter here is some material I have put
together so far:

Thanks and Regards