lua-users home
lua-l archive

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


Hi Phillip,

On 25/04/2013, at 10:02 AM, Philipp Janda <siffiejoe@gmx.net> wrote:

> Hello fellow Lua users!
> 
> Do you like Python's docstrings or their Lua equivalent[1]?
> Do you want your Lua function definitions to look like this ...
<snip>
> ... to get type checking for function arguments and/or return values?

Nice!

[1] does a similar argument-checking thing.  It parses special LDoc comments (that LDoc now supports) and uses a hook, rather than a decorator (hooks are unfortunately very slow, but at least optional).  Comment syntax is inspired by [2], which is also an argument checker, and there was a conversation about argument checking last year [3]

Cheers,
Geoff

[1] https://github.com/geoffleyland/argcheck
[2] https://github.com/SierraWireless/luasched/blob/master/c/checks.c
[3] http://lua-users.org/lists/lua-l/2012-10/msg00031.html