News for hackers. Stuff that matters.
Re:The Origins of Scala (2009) by ForHackernews on Saturday November 29, 2025 @04:16PM (#46090848)
Scala is a great language. It's a little bit disappointing that Kotlin is the JVM language that's gained so much traction instead.
Re:The Origins of Scala (2009) by 29athrowaway on Saturday November 29, 2025 @04:20PM (#46090891)
Except when you chain many collection operations... then it breaks horribly.
Re:The Origins of Scala (2009) by tbct on Saturday November 29, 2025 @04:44PM (#46091072)
Can you elaborate on what you're referring to? I can see performance becoming a problem if you repeatedly chain non-optimisable (in bytecode) as excluding the in place operations I believe all ops re-allocate the collection.
Re:The Origins of Scala (2009) by neko-kai on Saturday November 29, 2025 @06:50PM (#46091992)
Just use `.iterator` before chaining and the final collection will only be allocated once.
Re:The Origins of Scala (2009) by ATMLOTTOBEER on Saturday November 29, 2025 @10:07PM (#46093239)
Ignore that person they don’t know what they’re talking about lol
Re:The Origins of Scala (2009) by blandflakes on Saturday November 29, 2025 @04:55PM (#46091153)
They really obliterated their momentum with how they went about Scala 3, unfortunately.
Re:The Origins of Scala (2009) by atbpaca on Saturday November 29, 2025 @06:15PM (#46091739)
I don't think it is a problem with Scala 3 itself. Scala 3 brought a lot of improvements, one of them is using semantic versioning. People used to complain a log about binary compatibility between versions in 2.x. Now it's here. I think that the slow adoption of Scala 3 is mainly due to one of its most successful projects: Apache Spark. To this day, Spark only supports Scala 2.13 although Scala 3 has been around for years now. This is both disappointing and frustrating because a lot of people were introduced to Scala thanks to Apache Spark.
Re:The Origins of Scala (2009) by hnlmorg on Saturday November 29, 2025 @06:23PM (#46091797)
I learned scala due to load testing with Gatling.

I’ve always hated Java but Scala was super fun.

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:27AM (#46096106)
The language is actually really nice. The "we won't ship dotty as the next version of Scala, just kidding, here it is", the breakage of editors and IDEs that lasted for years, etc (aka, the WAY they did it) make migrating a poor value prop. If I have to suffer worse tools and pay the tax of fixing them/updating them, then for each system when I think it's time to migrate to Scala 3 I might think it's time to migrate off Scala entirely.

It's possible that nothing could have reversed their existing trend, but I think it's fair to say that smaller communities (as another poster mentioned) can't afford this level of friction. Have we not seen Perl->Raku? Python2-3?

Additionally, while almost all of Scala 3 is an improvement over 2, whitespace significance seems like an awful hill to die on. Most people who value that sort of syntax in domains where Scala has made any inroads are already on Python, and we're going to alienate many existing developers in the (vain) hope of increasing marketability?

Re:The Origins of Scala (2009) by spockz on Saturday November 29, 2025 @05:03PM (#46091216)
Why is that? I think they did a lot of things right. Offer automatic conversions, backwards and forwards compatibility from a sufficiently recent 12.x version.

I think mostly Kotlin being simpler and Java gaining features ate the lunch. Also, software like Akka and Spark becoming less prevalent hurt because they were big reasons for devs to learn the language. Not to mention the community drama.

The only bad thing was that it took quite long for Scala3 to become available leading to a lot of stagnation.

Re:The Origins of Scala (2009) by bearforcenine on Sunday November 30, 2025 @03:08AM (#46094799)
From my perspective the two biggest challenges of the Scala 3 migration were macros and poor tooling support.

Macros were an experimental Scala 2 feature, but were used all over the Scala ecosystem. Because they were considered experimental a good migration story for them was never developed. That lack of support stopped migration efforts dead in their tracks at our company for a long while. It just wasn't worth contributing simultaneous support for Scala 3 and Scala 2 macros to every third party dependency who used Scala 2 macros. That said, we did it for some and lived on a fork for others.

IDE support for Scala 3 was really rough when it first released. We checked in on it with every IntelliJ release for roughly 3 years before we decided it was far enough along. Prior to that it was rough enough that we froze migration efforts in order to keep the tooling usable enough for engineers to be productive.

Re:The Origins of Scala (2009) by neko-kai on Sunday November 30, 2025 @06:05AM (#46095672)
Well, IJ experience for Scala 3 is still noticeably worse than for Scala 2. We're still cross-compiling our work projects, waiting until Scala 3 support in Intellij is good enough to switch.
Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:32AM (#46096130)
> IDE support for Scala 3 was really rough when it first released. We checked in on it with every IntelliJ release for roughly 3 years before we decided it was far enough along. Prior to that it was rough enough that we froze migration efforts in order to keep the tooling usable enough for engineers to be productive.

Same story for us - about 3 years before Intellij was usable, even then not up to what it had been on Scala 2. We still only have 2 Scala 3 repos, out of about 30, for my team, and we're actually MORE adventurous than most other teams at the company!

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:31AM (#46096128)
As other posters mentioned, a lot of it is about lacking critical mass in the first place. Making such a dramatic change is a high-risk thing, and Scala didn't have enough of a lead at all to justify it.

> The only bad thing was that it took quite long for Scala3 to become available leading to a lot of stagnation.

Unfortunately this isn't the only bad thing. The language overall is definitely a nicer language (though I complain about the whitespace change elsewhere). The tooling was broken for years, which actually stalled our team's migration. How could I advocate for moving to Scala 3, just to send everybody's editors and IDEs back to the stone age?

I'm not arguing that they built bad technology, I'm arguing that they ignored the reality: the value prop of moving to Scala 3 vs... moving to something else, at that point, isn't that compelling.

Re:The Origins of Scala (2009) by forgetfulness on Saturday November 29, 2025 @06:32PM (#46091860)
What really obliterated Scala’s momentum was PySpark overtaking Scala Spark coming from Python’s foothold in Data Science, columnar data warehouses carving out a big chunk of the batch processing pie as well, and then the Akka licensing change.

The Enterprise ecosystem quickly withered away, and now only type level programming diehards remain.

Re:The Origins of Scala (2009) by hocuspocus on Saturday November 29, 2025 @11:37PM (#46093773)
Akka's demise started before the license change. It's an incredible piece of software but as it turns out, not so many people need stateful cluster sharding. Modern cloud architecture and simpler streaming libraries have made the Akka toolkit irrelevant to many use cases.

You're right about Spark and the next logical step will be removing the JVM from the equation entirely, which is already ongoing (see Photon or Comet).

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:34AM (#46096139)
I think realistically we're looking at a lot of causes (which is not surprising; it's rarely a singular thing). Scala 3's momentum may have already been negative but how Scala 3 landed represented a nail in the coffin for a lot of individuals, teams, and organizations.
Re:The Origins of Scala (2009) by hocuspocus on Sunday November 30, 2025 @08:19AM (#46096411)
Scala 3 really landed at a bad time as the hype behind Spark, Akka, Play had already weaned off. Typesafe was struggling financially, and didn't back Scala 3 then (that went to VirtusLab).

Typelevel and ZIO really put a lot of effort to release many libraries on day 1 despite the hurdles with the 3.0 release, because these communities are alive and healthy. Yet Odersky is on a small crusade against monadic effect systems, which discouraged a lot of good people. On top of that there are neverending feuds and US politics...

Re:The Origins of Scala (2009) by palata on Saturday November 29, 2025 @06:36PM (#46091897)
I remember being a big fan of Scala, and before Scala 3 it was looking to me that Kotlin was becoming a big competitor. Could that be, or do I have my timeline wrong?
Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:36AM (#46096155)
It competes in some ways and not in others. It does a pretty good job of providing similar benefits as many Scala ecosystems, but providing approachability over purity.

Kotlin becoming The Official Android Language helps it quite a bit, though the future gets interesting if Google successfully abandons the JVM entirely to rid themselves of Oracle. I'm skeptical that Kotlin targeting multiple runtimes is a winning proposition, but it certainly seems to be doing a better job than Scala Native (also Rust is probably the better choice than Scala Native for that kind of code anyway).

Re:The Origins of Scala (2009) by palata on Sunday November 30, 2025 @11:55AM (#46098279)
> I'm skeptical that Kotlin targeting multiple runtimes is a winning proposition

Kotlin multiplatform being adopted by Google for huge projects like Google workspace makes it sound like it may actually be a winning proposition, if you ask me. Kotlin is replacing the more-than-a-decade old, battle tested, Java-to-ObjC translation at Google. I find that very impressive.

> also Rust is probably the better choice than Scala Native for that kind of code anyway

For sharing code between e.g. Android and iOS, Kotlin multiplatform seems to become the better solution. If you use Rust, you still have to call it from Swift and you just introduced a 3rd language.

I have always hated multiplatform frameworks, but Kotlin multiplatform is actually something that I find interesting (and flexible enough that you can choose where it makes sense to use it instead of committing to a whole framework).

Re:The Origins of Scala (2009) by blandflakes on Monday December 01, 2025 @07:55AM (#46106863)
> Kotlin multiplatform being adopted by Google for huge projects like Google workspace makes it sound like it may actually be a winning proposition, if you ask me. Kotlin is replacing the more-than-a-decade old, battle tested, Java-to-ObjC translation at Google. I find that very impressive.

When it comes to Google, I'll believe it when I see it. How's Fucshia?

> For sharing code between e.g. Android and iOS, Kotlin multiplatform seems to become the better solution. If you use Rust, you still have to call it from Swift and you just introduced a 3rd language.

I'm not positing Rust for this or any multiplatform thing, I was suggesting that Scala Native is eclipsed by Rust in its relatively narrow niche (and actually in addition to Rust, graal native-image).

Re:The Origins of Scala (2009) by hibikir on Saturday November 29, 2025 @08:54PM (#46092814)
It was before this: It was never a huge community, but from very early on it was split thanks to some rather unfriendly, competitive personalities and very different goals. You didn't just use scala: you either ran scala with a Twitter stack, or a typesafe(now lightbend) stack, or a scalaz stack, or a cats stack, or a zip stack. And a lot of the people developing each stack didn't like each other. I've gotten to work with core contributors of multiple of those, and knowing that I wasn't a devotee of any stack led to hearing way to much complaining in pairing sessions about how The Others (TM) were slowing down the adoption of the language.

A language that is really popular can manage having 5 ways to do things, but a small community is just going to lose steam. And the fact is, all the ways work just fine in a vacuum, but you can't just get really mature tooling when everything is just so split.

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:23AM (#46096069)
Yeah, I think with a community as small as Scala's, you can't really afford:

a. fragmentation of the ecosystem b. repeated shuttering/abandonment of some of the most popular options (Lift, Play, Akka) c. splitting the language in two

The perception within and without my own employer (which heavily invests in Scala) swapped from "acceptable" to "this ecosystem is a dead-end and we need to get out" with the launch of Scala 3. It's possible they would have reached the same conclusion, but I don't think breaking every industry engineer's development tools for years is a good strategy.

Re:The Origins of Scala (2009) by dboreham on Saturday November 29, 2025 @05:12PM (#46091281)
I've used both fairly extensively. Scala is just "too much". Kotlin is perhaps not enough, but that's better than too much.
Re:The Origins of Scala (2009) by palata on Saturday November 29, 2025 @06:39PM (#46091921)
I was first a big fan of Scala, and while I still like it, I am now really into Kotlin.

I don't find it disappointing: I tend to consider that Scala was an inspiration for Kotlin. Maybe Kotlin won by being simpler, and definitely because of the tooling and community: being backed by JetBrains and Google helps.

For a long time, the tooling was very limited with Scala, which must have slowed its adoption, right?

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @07:49AM (#46096238)
Kotlin is pretty nice. I think the build tool in Scala being so esoteric didn't help with adoption; I remember avoiding Scala for a few years because dealing with sbt left a horrible taste in my mouth.
Re:The Origins of Scala (2009) by hocuspocus on Sunday November 30, 2025 @10:26AM (#46097378)
Scala CLI should have happened 5 years before, but honestly sbt has improved a lot, the DX is mostly fine since the 1.0 release and it's maintained plugin compatibility for 8+ years.

Gradle is worse on several dimensions, which didn't really hurt Kotlin's adoption, nor seems to fundamentally bother Android developers (ok, they have little choice here).

Re:The Origins of Scala (2009) by blandflakes on Sunday November 30, 2025 @11:39AM (#46098109)
I'm not advocating for Gradle either, but you already pointed out why the build tool being bad is relevant for Scala and not for Kotlin - Android developers have enough other reasons that they're going to use Kotlin, even though Gradle sucks. Scala developers... don't, and so just another straw stacked on a camel's back, so to speak.
Re:The Origins of Scala (2009) by hocuspocus on Sunday November 30, 2025 @11:50AM (#46098229)
I'm not saying it played no role, but I think sbt's negative impact is overblown.

Maven is old and the DX isn't particularly stellar either. User friendly build tools are a relatively recent development in the programming language landscape. Hell, until uv, Python managed to be much worse than anything on the JVM.

I work at a company that used to do a lot in Scala, and I've seen the decline first hand. Lack of investment in basic upkeep and maintenance is the real killer. Bitrot hurts in Scala more than in Java. And sbt is not the biggest offender there.

Re:The Origins of Scala (2009) by blandflakes on Monday December 01, 2025 @07:43AM (#46106760)
I also work at a company that used to do a lot in Scala, and have seen the decline firsthand. Who's anecdata is better?

I think a lot of posters make the mistake of saying "$otherLanguage has it worse." That's irrelevant! If otherLanguage is an incumbent, they can afford to have it worse. I don't think it's debatable that sbt harmed adoption in the first place and continued to represent a barrier to Scala's adoption for years, and it doesn't matter how good maven is or isn't.

The degree to which is certainly always going to be up for debate; as mentioned before, there are many factors, but sbt was not a nonfactor.

Re:The Origins of Scala (2009) by hocuspocus on Monday December 01, 2025 @01:11PM (#46110785)
My point is that the decline is multi-factorial, as usual.

Scala needs some investment and commitment, you need a least one person who knows what they're doing: enforce a reasonable coding style, keep dependencies aligned and up to date, enable all the automated checks and linting, ...

Usually, when this is in place, then sbt is mostly a non-issue. You onboard a junior, they follow established practices, that includes the build. Sbt plugins are in fact a good way to standardize builds in a corporate setting.

Scala CLI was made for students and people who come from the outside. Sure, sbt is scary to them. But in the grand scheme of things, that's not what matters. Industry adoption doesn't really depend that much on the "zero to hello world" experience.

Case in point: several big Scala shops use Bazel. Bazel is 100x scarier than sbt and requires a bigger upfront investment.

Re:The Origins of Scala (2009) by blandflakes on Monday December 01, 2025 @02:28PM (#46111915)
Bazel being used by some companies is not vindication that sbt wasn't a significant source of friction, just another arena where sbt was considered less fit for the job (whether one could argue sbt should have been able to do the job would certainly be context-dependent).
Re:The Origins of Scala (2009) by hocuspocus on Monday December 01, 2025 @04:29PM (#46113486)
If you work on internal libraries and apps, on a team with established practices, sbt shouldn't be a regular source of friction. It's really not that hard to define re-usable templates (you can even use Giter8!) for the typical multi-module build in a work setting. 99% of my projects either publish libraries to an internal Maven mirror, or packages apps with the native packager plugin, often OCI images nowadays. Sbt can be easily bootstrapped behind a Maven Central mirror entirely, you just need a single bash script. Sure the Maven and Gradle integrations in IntelliJ IDEA are more polished, but I'd pick sbt over these two without thinking, even for pure Java projects. Nowadays Mill is even better in many cases.

And the fact Bazel rules exist for a language doesn't say much about its native toolchain really. Large scale polyglot codebases and especially monorepos don't play nice with common tooling. But anyway you're missing my point. Developer friendly toolchains are the exception, not the norm. There's some impact on industry adoption, but not a huge one all things considered. Otherwise nobody would have touched Python before 2024.

Re:The Origins of Scala (2009) by blandflakes on Monday December 01, 2025 @06:58PM (#46115354)
I think we're simply going to have to agree to disagree.

Your position presupposes quite a bit of "systems already in motion" to make the point that there isn't friction. Except... there is, and _somebody_ has to maintain your builds, and handle all those fun deprecations like when the integration test project gets removed and the syntax gets updated. These things aren't stable, untouched pieces of your services over time, and I want everybody on my team, not just some experienced Scala developer who has already performed the rituals required to understand and establish practices for sbt, to contribute.

And what about the onramp to Scala? I'm certainly not relying on a team of established practitioners to pave the way when I'm learning a new language. We're talking about a dying language, I think it's silly to dismiss this.

> But anyway you're missing my point. Developer friendly toolchains are the exception, not the norm. There's some impact on industry adoption, but not a huge one all things considered. Otherwise nobody would have touched Python before 2024.

And you continue to miss mine - incumbent languages can afford more friction than niche languages. Python or Java's ability to have mediocre dev experiences do not have much bearing on how impactful Scala's is (though frankly, Java is not really worse than Scala in my opinion, and trendwise I think we see sbt displaced by java tools or mill more than maven or gradle in the reverse, so the industry tends to agree).

Re:The Origins of Scala (2009) by hocuspocus on Monday December 01, 2025 @09:53PM (#46116846)
And again, if there's nobody that can maintain sbt builds you're screwed anyway. This is precisely what I said earlier: bitrot and lack of upkeep are the real killer. Sbt is the least of your worries in such scenario. There's no way a team of inexperienced Scala developers can bootstrap a greenfield project unsupervised, unless they're committed to a slow and painful onramp period. Sbt is just one small variable here.

For the sake of argument, imagine Scala had had the best build tool of the entire programming landscape in the past two decades. This would change nearly nothing to the current situation and Scala 3's adoption.

Re:The Origins of Scala (2009) by pjmlp on Monday December 01, 2025 @03:55AM (#46105090)
Gradle is only still around thanks to Android, thankfully I have moved away from Android projects.

No need to read about how Kotlin is going to take over the world, while comparing it to samples written in Java 8, or the whole tooling infrastructure mess that needs to be changed, sorry improved, for each Google I/O, or stable Android Studio releases that crash on first use after upgrade, while "fixing" Gradle DSL changes.