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

Swift has also pattern matching which I think is really awesome.



This is its greatest feature if you ask me... Imperative, classical OO language WITH pattern matching. It's a crazy world we live in.


Yes. They even have ranges in the patterns inside tuples. Not sure if any other language has that particular syntax.


F# has that. And also allows you to define your own constructors to pattern match on anything you want.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: