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

I do not agree with that, this is not just syntactic sugar, for example in case of large 'else if' statements the complexity to choose proper branch is O(n), instead with pattern matching the chosen branch will be at constant time.


While the article mentions Pattern Matching, it seems to be something for the distant future. I was referring changes of Java 11, which seems to me the focus of the article.


If I am not mistaken, Pattern matching will be included on Java 11, please correct me if I am wrong.




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

Search: