logoalt Hacker News

sema4hackerlast Sunday at 9:12 PM3 repliesview on HN

> I was refreshing one of our services. Part of this process was to migrate codebase from Scala 2.13 to Scala 3.

My first question was: why?


Replies

pxclast Sunday at 10:54 PM

Scala 3 is sorta a new language, bringing a lot of improvements to the type system: https://docs.scala-lang.org/scala3/new-in-scala3.html

It also looks like it has some improvements for dealing with `null` from Java code. (When I last used it I rarely had to deal with null (mostly dealt with Nil, None, Nothing, and Unit) but I guess NPEs are still possible and the new system can help catch them.)

lmmlast Monday at 5:00 AM

If you're going to "refresh" a codebase you probably want it to be on the current version of things. Old dependencies rot, like it or not. I don't think there's any timeframe for Scala 2 EOL yet, but new development is happening in 3.

dionianlast Monday at 4:11 AM

Why not though the upgrade process from 2.13 to 3 is pretty smooth. And you get all the new language features. I can think of a few that I actually like. I’ll just mention enums because it’s a good example.