[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Optional static types for Lua - experimental derivative Ravi
- From: Dibyendu Majumdar <mobile@...>
- Date: Sun, 18 Jan 2015 17:45:01 +0000
On 18 January 2015 at 16:28, Richard Hundt <firstname.lastname@example.org> wrote:
>> 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.
> Interesting project. Does it differ from the semantics of  as
> implemented in ? I get that it'll be implemented in C as part of
> the core, so it's obviously different in that way, but just wondering
> why "the ideas are all in flux".
>  http://www.lifl.fr/dyla14/papers/dyla14-4-typed-lua-an-optional-type-system.pdf
>  https://github.com/andremm/typedlua
Well the objectives are very different I think. I am looking to
improve efficiency of certain operations. So the static typing is for
that purpose. Therefore the features I intend to support will be a
subset of above. For example, as of now I have no intention to provide
syntactic support for classes or interfaces. Also no concept of union
There may be other differences. For instance the function calls are
currently dynamic with no static checking of return type - but I
insert instructions to coerce return types to comply with typed
variables, and it is a runtime error if the coercion fails.