by reledi · 6y ago · 0 comments
AFAIK, the closest we have right now is
- typespecs
- guard clauses
- structs w/ required keys (cannot specify types)
- ecto embedded schemas (e.g. structs with "typed" fields)
So yeah typesecs and guard clauses cover a lot of that (and the ever fun dialyxir) but it's more cumbersome than just typing your function parameters and variables.
And funnily enough in the end what I miss the most is the type hinting when I write function calls. I use Intellij and the elixir plugin doesn't support that AFAIK, it's a real productivity killer.
When I get a `Point` struct, I have no guarantee that the wrapped lat/long are actually valid. After 15 years of static typing this is just so stressful :)