4 ms·
Elixir's pattern matching seems to handle this case quite well, despite having dynamic typing. This approach feels like the best of both worlds to me.
by udfalkso 8y ago
Elixir's pattern matching seems to handle this case quite well, despite having dynamic typing. This approach feels like the best of both worlds to me.
- jb3689 8y agoKeep in mind that pattern matching can be dangerous. Change something and suddenly your code could be flowing in new unexpected ways without notifying you with a runtime error. I like pattern matching too but it has bitten me
- true_religion 8y agoSure, but that's the same issue you have in a dynamic language anytime you use an if statement, or a switch statement.