Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,089 posts.

Any topic
2018
1854

JEP 325: Switch Expressions

Extend the switch statement so that it can be used as either a statement or an expression, and that both forms can use either a "traditional" or "simplified" scoping and control flow behavior. These changes will simplify everyday coding, and also prepare the way for the use of pattern matching (JEP 305) in switch …