6 ms·
While you're waiting for official support in the language, just properly document functions with @spec and change them to @spec! after adding TypeCheck to your
by keep_reading 3y ago
While you're waiting for official support in the language, just properly document functions with @spec and change them to @spec! after adding TypeCheck to your project and viola, you get powerful type checking at runtime with almost no performance impact. The error messages it produces are so beautiful.
https://github.com/Qqwy/elixir-type_check https://github.com/Qqwy/elixir-type_check
- conradfr 3y agoIn a functional language where you're writing a lot of functions it's a bore and feel very dated. Especially as you have to write the function name so copy/paste from other @spec doesn't really at least speed it up. It is what it is I guess.
- keep_reading 3y agowell, you can avoid this if you try to limit the number of public functions so you don't have to do this as often. make as many defp functions as possible, really.
- satvikpendem 3y ago> and viola Nice to see you are a musical aficionado too. More seriously, how does this compare to other type checking alternatives for Elixir/BEAM were I to start a new project, including Gleam and Witchcraft (which at least seems to be unmaintained for now)?