Hacker News new | ask | show | jobs
by nchi3 1491 days ago
Because there are scenarios where pattern matching (or instanceof) is the better and more ergonomic thing to use. One obvious example I can think of is event handling.

If anything, this is _not_ something JS devs are asking for, but rather devs using functional languages.

1 comments

I also think of API ergonomics. Unspecified input with the same single endpoint, while under the hood will be absolute spaghetti, from a developer adoption standpoint can be make or break.

And if you're strongly typing your system rather than relying on strings, extra so.