Dev News Daily ENDE

Scala 3.10.0 matches Java records, stabilises SIP 71 and lists eight breaking changes

The Scala team published Scala 3.10.0 on 12 October. It is a minor release in the Scala 3 line, but it opens with a section of breaking changes, so it is worth reading before a build bumps the compiler version.

Breaking changes. The release notes list eight. Implicits are no longer inferred from a companion object that is not accessible at the use site. Constant folding during inlining is enhanced. The compiler stops catching StackOverflowError and uses a "fuel" budget instead. this is forbidden in top-level definitions. The runtime.Rich* implicit conversions on primitive types are replaced by direct extension methods, and the -> tuple sugar becomes an inline method. Using with as a type operator is now an error. Finally, bytecode generation uses stock ASM rather than the project's long-standing scala-asm fork.

Highlights. Pattern matching now supports Java records, which matters for codebases that share types with Java modules. String literals gain the \s space escape. The REPL accepts //> using dep directives, so a dependency can be pulled into a REPL session the same way as into a Scala CLI script. The distribution gains .deb and .rpm packages.

Scala 3.10.0 matches Java records, stabilises SIP 71 and lists eight breaking changes
Scala 3.10.0 matches Java records, stabilises SIP 71 and lists eight breaking changes — Dev News Daily

Language process. One feature moves to stable: under SIP 71, strictEqualityPatternMatching is enabled by default, together with a deprecation mechanism for -language feature flags. Three SIPs enter preview: SIP 61 (unrolling default arguments for binary compatibility), SIP 75 (relaxed lambda syntax) and SIP 68 (referenceable package objects). Two pre-SIP ideas land as experimental: inline and specialized traits, and "spec strings".

Scala CLI. The bundled Scala CLI moves from 1.16.0 to 1.17.1. Among its changes: JEP 512 flexible main methods on JDK 25 and later (JDK 21 with --enable-preview), individual files as resources, and -d paths ending in .jar producing a library JAR. One detail can surprise build scripts: the lts version tag now resolves to the Scala 3.9 LTS series, and pinning the older line requires 3.3.lts.

Who should act. Libraries that cross-compile, and projects relying on the removed Rich* implicits or on with in type position, should test against 3.10.0 first. Teams on the LTS tag in Scala CLI should check which series their builds now resolve to.

Source: Scala, release notes for 3.10.0 — https://github.com/scala/scala3/releases/tag/3.10.0