Scala and the JVM
·
Part 20
unapply decides what catch catches: Scala extractors in match and try/catch
A hand-written unapply turns a catch block into a policy: pass your own errors through, wrap recoverable JVM exceptions, and let fatal ones propagate. A runnable Scala 2.13 demo shows exactly when the matcher calls it.
19 Oct 2026
·
5 min read
·51 views
Scala and the JVM
·
Part 19
Escaping Boolean hell and making Illegal States Unrepresentable in Scala 2.13
A sealed trait removes impossible states from a model, but five details decide whether it holds: constructors, exhaustivity warnings, wildcards, Scala 2 inference and secrets in toString. I compiled each one on Scala 2.13.18.
17 Oct 2026
·
8 min read
·89 views
Scala and the JVM
·
Part 18
Spring Boot to Scala and Play on a live site, without losing an email
I replaced this site's Spring Boot backend with Scala 2.13, Play 3, Anorm and Twirl in one pull request. The rewrite was the easy part: this is how I fixed the contracts, kept the outbox wire format, and rehearsed the rollback on a restored production backup.
9 Oct 2026
·
6 min read
·102 views
Scala and the JVM
·
Part 17
Scala: Part 16: Asynchronous Scala Without Blocking
I connect Future composition and recovery to the map/flatMap pattern, reproduce one-worker starvation safely, and finish with the distinction between a business Left and a failed Future.
3 Oct 2026
·
6 min read
·83 views
Scala and the JVM
·
Part 16
Scala: Part 15: From String Errors to Typed Scala Results
I replace String failures with a sealed family of domain errors, keep Either composition unchanged, and choose human-readable messages only at the display boundary.
30 Sep 2026
·
5 min read
·102 views
Scala and the JVM
·
Part 15
Scala: Part 14: Testing Scala Results - Values, Errors and Exceptions
I unpack AnyFunSuite from a Java developer’s perspective, test returned Right and Left values, check thrown exceptions with intercept, and verify that independent expectations catch real mistakes.
29 Sep 2026
·
6 min read
·105 views
Scala and the JVM
·
Part 14
Scala: Part 13: Scala Try for Java Developers - Capture, Compose and Recover
From Java-style exception handling to composable Scala results: capture a throwing conversion, understand map versus flatMap, write the same chain with for, and recover only from a specific failure.
24 Sep 2026
·
6 min read
·104 views
Scala and the JVM
·
Part 13
Scala: Part 12: Scala Either for Java Developers - A Result or a Reason
From a Java/Spring perspective, I build Scala Either from explicit Left/Right cases to map, flatMap and a for-comprehension, with three verified lookup outcomes and failure reasons that survive the chain.
22 Sep 2026
·
6 min read
·97 views
Scala and the JVM
·
Part 12
Scala: Part 11: Scala 2 Implicit Classes - Where Did That Method Come From?
Coming from Java, a String with a lookup method looks wild. I unpack Scala 2 implicit classes into an ordinary wrapper, then show how the compiler can supply its repository argument too.
21 Sep 2026
·
5 min read
·102 views
Scala and the JVM
·
Part 11
Scala: Part 10: Scala 2 Implicit Parameters - What the Compiler Supplies, and Why It Refuses
From multiple parameter lists to compiler-supplied repository arguments: real missing and ambiguous implicit errors, explicit fixes, and the difference between a missing dependency and a missing policy.
21 Sep 2026
·
5 min read
·103 views