Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python has it as well.


Ah my mistake. It’s been at least 5 years since I’ve written it. I’m honestly surprised that JS has moved no where on it considering all of the fancy things they’ve been adding.


It has been proposed, but since there is all the process on how features get added into the standard, someone needs to champion it, and then there is the "at least two implementations" factor.

https://github.com/tc39/proposal-pattern-matching




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: