4 ms·
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
by Thaxll 3y 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.
- chem83 3y agoJose Valim is investigating set-theoretic types, as you may have heard: https://news.ycombinator.com/item?id=37593967 https://news.ycombinator.com/item?id=37593967
- sodapopcan 3y agoI 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.
- impulser_ 3y agoPython 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.
- Thaxll 3y agohttps://elixir-lang.org/getting-started/typespecs-and-behaviours.html#types-and-specs https://elixir-lang.org/getting-started/typespecs-and-behavi... "Elixir is a dynamically typed language"