Scala Pattern Matching, from a Java developer perspective. Part 2.

This is the second part of a series of articles about pattern matching in Scala. In the first part we’ve covered literal pattern matching, matching against different data types and matching on case classes. We’ve decompiled (in Java) the byte code created by Scala just to have a better understanding of the things that happen …

Read More Scala Pattern Matching, from a Java developer perspective. Part 2.

Scala Pattern Matching, from a Java developer perspective. Part 1.

Pattern matching is one of the most used Scala feature. Try to open a random Scala file and there are great chances to find a couple of match blocks. From a Java developer perspective, pattern matching may look like a switch statement, but it is much, much more powerful than that. Syntactically, a Scala match …

Read More Scala Pattern Matching, from a Java developer perspective. Part 1.