lua-users home
lua-l archive

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

You might be interested in the optional type system for lua that I have been working on, using F#. The project is located here: Note that the downloads section contains only an old binary that lacks any typechecking functionality. It isn't quite finished, but I might end up allocating some time for it in the near future.

Basically, the idea is that someone would write an F# plugin that, given a Lua AST for a single module which is assumed to contain a class definition, transforms the definition into a type. The parameters and return types of functions can be given type annotations via comments.


On 7/27/2012 9:11 AM, Petri Häkkinen wrote:
On 26.7.2012, at 19.25, steve donovan wrote:
PS. I note in the comments you were approached by a member of one of
the Testing cults, offering to send you pamphlets.  I think testing is
cool, but I question the judgement of people who think that _only_
testing is cool.
Yeah, the biggest problem with test driven development for me is that writing test code is dead boring :) Even if it would make me 2x productive (which I really doubt) I probably couldn't never force myself to use it.

I think a better alternative would be to implement optional type annotations and automatic type inference system for Lua. These could be used to do static type checking and would help catch errors early.

Something along the lines of metalua&  luainspect which I should research more into when I have some time.