lua-users home
lua-l archive

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


I am happy to announce release 1.0 of typecheck.

Typecheck's home page is at http://gvvaughan.github.io/typecheck

A Luaish run-time gradual type checking system, for argument and
return types at function boundaries with simple annotations that
can be disabled in production code.  Its API and type mismatch
errors are modelled on the core Lua C-language `argcheck ()` API.                                   

- Luaish:
    Type check failures show error messages in the same format
    as Lua itself;                                                         
- run time:
    Without changing any library code, the application can decide
    at run time whether to enable type checking as it loads the
    library;                                                               
- gradual:
    Type checks can be introduced to the functions in your code
    gradually, to as few or as many as seem useful;                        
- type checking:
    function argument types and return types are checked against
    the specification, and raise an error on mismatch.                             
                                                                         
This is a light-weight library for Lua 5.1 (including LuaJIT), 5.2
and 5.3 written in pure Lua.                                         

This code started life as the function argument and return type
checking system I wrote for lua-stdlib. I’m in the process of
slimming down lua-stdlib in preparation for the next release though,
part of which means that you can now use typecheck without requiring
the installation of all of stdlib.

## Noteworthy changes in release 1.0 (2016-01-25) [stable]

### New features

  - Initial release, now separated out from lua-stdlib.


Install it with LuaRocks, using:

    luarocks install typecheck 1.0