Hacker News new | ask | show | jobs
by Thaxll 994 days ago
Elixir gets a lot of praise but very rarely mention that is't a dynamically typed language, people will talk about Dialyzer/type hints but it's vastly inferior to strongly typed language.
3 comments

I know people mean different things when they say this but Elixir is strongly typed in that it doesn't auto-cast. Furthermore, it goes farther than most languages in that it doesn't overload many operators. For example, string concatenation is done with `<>`, not `+`. This rules out many of those "subtle bugs" you would get in many other dynamic langues. For instance: `def compound_word(left, right), do: left <> right`. Even though there are no types specified (or even patterns of guards) this function can only every succeed with strings. Yes, it's still dynamic and will only be caught at runtime, but there are things about Elixir that make it a really nice dynamic language.
Python gets a lot of praise too despite being a dynamically typed language. People will talk about MyPy/type hints but it vastly inferior to statically typed language.

(Elixir is strongly typed btw)

Elixir is essentially the functional python.

Jose Valim is investigating set-theoretic types, as you may have heard: https://news.ycombinator.com/item?id=37593967