from Hacker News

Scala 3 Migration: Report from the field

by AzzieElbab on 2/6/25, 5:54 PM with 123 comments

  • by caterama on 2/6/25, 10:37 PM

    Scala used to be my hobby / enthusiast language. Introduced to it through a college course, and used a bit through school. Later, I would use it for Advent of Code, tinkered with a Scala Play webapp, and dream about using it professionally. Rust has almost completely filled that void now. Rust is native, I'm not waiting on the 1.0 release of `scala-native` anymore. The community around Rust seems to be enthusiastic and growing, as opposed to languishing for Scala. I hold some reservations about Rust in terms of how complicated it is. Despite having used it for an amount of time that I would be feeling comfortable in most languages, I am still not comfortable and continually encounter _stuff I don't understand_.

    RIP Scala, I will miss you! You showed me the joy of pattern matching, functional OO, currying, how to use `map` `flatMap` `fold`, etc. All things with continued influence! <3

  • by dtech on 2/6/25, 8:33 PM

    I left the Scala ecosystems (mostly) a year or 4 ago, right around the release of Scala 3. It's a shame that the compatibility and tooling situation doesn't seem to have improved much since then. The Scala devs always said they wanted to avoid a Python 2->3 situation, but it seemed like they didn't quite achieve that.
  • by theLiminator on 2/6/25, 9:15 PM

    Back when I used to use Scala, the biggest PITA was how every minor version bump you'd run into binary version incompatibilities that you'd only run into at runtime. Has that situation changed?

    I've always felt that Scala the language was always pretty nice, but Scala the ecosystem/tooling was moderately painful to work with. It was getting better over time, but they lost all the momentum they had.

  • by codr7 on 2/6/25, 10:34 PM

    That's how I learned to do migrations/major refactoring from my mentors back in the days.

    First brute force it, observe but don't panic, until you don't get any further.

    Then start over and do it properly.

  • by philipkglass on 2/6/25, 7:17 PM

    This is a good report. I started a project last year on Scala 2.13, but had all Scala 3 compatibility features/warnings enabled from the beginning. It sounds like it should be an easy upgrade in the future as long as I don't rely on macros or libraries that rely on macros. I've tried to stick to libraries that already have Scala 3 releases or that come from plain Java.
  • by danielciocirlan on 2/7/25, 7:56 AM

    This is a good report.

    Scala 3 is really what Scala was supposed to be. The language is just about perfect, and the most important and popular libraries and tools (Cats/Cats Effect, ZIO, Play Framework, Akka/Apache Pekko) are all supporting the new version for years already.

    It's really a shame that IDE support has yet to catch up and the dev experience is frustrating at times, but I'm using Scala 3 for everything I can.

  • by lopatin on 2/6/25, 9:12 PM

    I only allow myself to use Scala these days if follow some rules: no sbt (just Maven) and no Scala libraries (just Java ones). I never used fancy stuff like Cats anyways. Curious to hear who actually does, and for what.
  • by whoodle on 2/7/25, 2:39 AM

    I currently work at a company who is primarily writing in Scala. I really like Scala but assume my next role won’t be in that. Are my two best options Rust and Java if I want to keep some of the typing, functional style, and pattern matching while also moving to a more popular language?
  • by fulafel on 2/7/25, 6:21 AM

    It will be interesting to see how Clojure and Scala do in the longer run in the industry oriented FP languages scene. I wonder if there's any data points around that could tell a tale.
  • by virtualwhys on 2/6/25, 10:14 PM

    Migrated a Scala 2.8(!) era codebase to Scala 3.

    As OP explains, macros and abstract type projections tend to be the biggest pain points in complex applications; otherwise, with Scala Rewrite tool it's pretty straightforward.

    I think it's more inertia than anything else that more Scala 2 companies don't migrate.

    Unpopular opinion, but setting a Scala 2 sunset time would spur companies into action :)

    As it stands Akka (previously Lightbend, previously TypeSafe) is the maintainer of Scala 2, and derives part of its revenue from Scala 2 support contracts so there's even less incentive to migrate when there's no EOL date as Python 2 (eventually) had.

  • by dylanowen on 2/6/25, 8:21 PM

    This is a great write up! For people using gradle to compile scala (definitely not my first choice) the initial hurdle to migrating individual modules has been fixed! I'm guessing it'll be in gradle 8.13 https://github.com/gradle/gradle/pull/31118
  • by paulddraper on 2/6/25, 7:54 PM

    I didn't know the ecosystem wasn't on 3.

    It was released May 2021.

    It is a big change though.

  • by rr808 on 2/7/25, 3:37 AM

    Currently work on a Scala/Spark project as part of our work. Everyone hates it except the one guy who knows it well, but for most people who spend most of their time doing imperative languages its just too much of a mind jump. Hopefully soon we'll be on a new big data platform soon and we wont have to deal with a migration like this.
  • by spockz on 2/7/25, 5:11 AM

    As I mentioned deeper in the thread, https://news.ycombinator.com/item?id=42969519, Java seems to have caught up with Kotlin and Scala language wise. (With Scala3 having the most extensive type system.)

    The ecosystem also seems to have petered out. Akka, spark, and flink used to be reasons to do scala. But they have decent java interfaces now.

    I’ve had too much struggles convincing colleagues that actually more information in the type is convenient. It seems like the same religion of untyped vs typed.

    What is left as reasons to choose for scala or Kotlin?

  • by slavomirvojacek on 2/6/25, 9:08 PM

    I am wondering whether with GenAI, migrations like this one will be less and less painful, and therefore more people will be able to migrate to newer technologies/versions sooner and quicker.
  • by aristofun on 2/7/25, 2:52 PM

    Scala has some nice and cool vibes and features to it.

    But that is where good parts end.

    From the POV of real world boots-on-theground software challenges and developers it is a poorly designed, overengineered and overrated piece of complexity.

    Complexity disconnected from reality of software engineering as a tool to serve business needs.

    I can explain why this happens but I don’t want to get downvotes. People hate hearing bitter truth:)

  • by cbeach on 2/6/25, 7:21 PM

    Very useful document, thanks Pierre!

    Our company is still on 2.13 and probably will be for a long time. The reality is that we need rock-solid library support across all transitive dependencies, and mature battle-tested tooling.

    I like that the Scala language continues to improve, but its appeal in real-world enterprise applications took a hammering due to the backwards-incompatible changes in Scala 3, shaky tooling and ecosystem issues.

    Also the elephant in the room - the Scala Center and toxicity within the Scala community.

    The Scala Center Executive Director is a political sciences graduate with no commercial Scala experience, who gave this expletive-laden sexualised rant at a Scala conference:

    https://x.com/jdegoes/status/1633888998434193411?s=46&t=V_LF...

    When this ugly performance was called out by a member of the Scala ecosystem, it was the guy that called it out that got brigaded and cancelled, while the executive director Darja Jovanovic was defended by the community, and remains in place.

    And then there's Scala Center Community Representative Zainab Ali, who led an orchestrated witch hunt against a contributor to the Scala ecosystem. She ended up in the UK High Court for her role in this, and admitted fault (defamation) and settled.

    https://pretty.direct/statement

    Like the executive director, the community rep remains in place at Scala Center:

    https://www.scala-lang.org/ambassadors/