|
|
|
|
|
by dozzie
3869 days ago
|
|
> That's dynamic typing. No, that's run-time branch selection. Exactly as with pattern matching (`match
.. with ..'), except the latter is more convenient. > Seriously, you sound like, "why bother with Ocaml when JavaScript does the same thing?". And you really think I consider elaborate constructions a better thing than
concise pattern matching? |
|
With pattern matching you'll get static checking if your matching is exhaustive. Impossible with an if ladder. Therefore they're not semantically equivalent.