Hacker News new | ask | show | jobs
by nicoburns 1893 days ago
> That said, give me proper pattern matching in JS. Hard to live with languages that haven't caught up yet.

I really want this. Along with switch being as expression. Seems like something that JavaScript is obviously missing.

2 comments

> Along with switch being as expression

Even PHP has this now, albeit with a different keyword (match) due to existing switch semantics being pretty bad

I really want... switch being as expression.

Unfortunately JavaScript still hasn't caught up with CoffeeScript.