4 ms·
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), in
by lovelle 8y ago
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.
- ckarmann 8y agoWhile 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.
- lovelle 8y agoIf I am not mistaken, Pattern matching will be included on Java 11, please correct me if I am wrong.