Re:Switching to Elixir
by kimi on Friday November 10, 2023 @01:14AM
(#38215646)
I miss static typing for two separate and quite opposite cases:
* trivial errors, that still cause a crash and waste my time ("foo(:yo, 7)" but was "foo(7, :yo)") - sometimes spotted by Dyalizer
* complex nested structures. In Java I never have surprises as to what foo.bar.baz is and I can use autocomplete reliably. Expressingthe same invariant in Elixir is something less straightforward
* trivial errors, that still cause a crash and waste my time ("foo(:yo, 7)" but was "foo(7, :yo)") - sometimes spotted by Dyalizer
* complex nested structures. In Java I never have surprises as to what foo.bar.baz is and I can use autocomplete reliably. Expressingthe same invariant in Elixir is something less straightforward