Re:Switching to Elixir
by prophesi on Friday November 10, 2023 @09:05AM
(#38218959)
Does José need to write up an elixir-lang.org blog post every other week on the status of their type system project for HN's collective memory to know it's in the works?
[ Parent
| on HN ]
Re:Switching to Elixir
by keep_reading on Friday November 10, 2023 @09:54AM
(#38219577)
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.
In 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.
Re:Switching to Elixir
by keep_reading on Friday November 10, 2023 @11:42AM
(#38221031)
well, 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.
Re:Switching to Elixir
by satvikpendem on Friday November 10, 2023 @11:08AM
(#38220563)
> 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)?