←back to thread

Scala 3 slowed us down?

(kmaliszewski9.github.io)
261 points kmaliszewski | 1 comments | | HN request time: 0.344s | source
Show context
pjmlp ◴[] No.46183020[source]
The only issue I have with Scala 3 is Python envy, they should not have come up with a second syntax, and pushing it as the future.

If anything is slowly down Scala 3 is that, including the tooling ecosystem that needs to be updated to deal with it.

replies(4): >>46183121 #>>46183318 #>>46184223 #>>46187857 #
gedy ◴[] No.46183121[source]
As a former Scala fan, wow you aren't kidding, wth

    val month = i match
        case 1  => "January"
        case 2  => "February"
        // more months here ...
        case 11 => "November"
        case 12 => "December"
        case _  => "Invalid month"  // the default, catch-all
    
    // used for a side effect:
    i match
        case 1 | 3 | 5 | 7 | 9  => println("odd")
        case 2 | 4 | 6 | 8 | 10 => println("even")
    
    // a function written with 'match':
    def isTrueInPerl(a: Matchable): Boolean = a match
        case false | 0 | "" => false
        case _ => true
replies(3): >>46183181 #>>46183392 #>>46185346 #
malkia ◴[] No.46185346[source]
Sorry, I'm coming from C++-ish background - can anyone explain what's going on :)
replies(1): >>46185895 #
hocuspocus ◴[] No.46185895[source]
Scala 2's syntax is mostly Java/C-style with a few peculiarities.

Scala 3's optionally allows indentation based, brace-less syntax. Much closer to the ML family or Python, depending on how you look at it. It does indeed look better, but brings its share of issues.[1] Worse, a lot of people in the community, whether they like it or not, think this was an unnecessary distraction on top of the challenges for the entire ecosystem (libraries, tooling, ...) after Scala 3.0 was released.

- [1] https://alexn.org/blog/2025/10/26/scala-3-no-indent/

replies(2): >>46186698 #>>46210666 #
1. still_grokking ◴[] No.46210666[source]
Just for context, a lot of people in the community think that this syntax change was the best thing that happened to Scala since its inception.

Also the silent majority thinks that the people who still lament over that change are just a very vocal minority.

Almost all Scala 3 code uses the new syntax, no matter how loud a few people cry. Similar situation to systemd on Linux…