The Origins of Scala (2009)
62 points
9 hours ago
| 11 comments
| artima.com
| HN
Zambyte
8 hours ago
[-]
Scala was the second programming language I learned (the first was Java). I think I'm quite lucky to have picked up a language like Scala so early in my programming journey. It made it very easy for me to learn new programming languages, since it made it easy to support wildly different paradigms (which is also what makes it hard to use in an enterprise environment).
reply
SOLAR_FIELDS
6 hours ago
[-]
yeah, you get everything and the kitchen sink with Scala. Which is actually IMO its biggest weakness. It wants to be everything, and it isn't amazing at anything as a result.
reply
tanin
5 hours ago
[-]
That is why I actually like Scala. I want every tool to be available at my disposal, and I can choose what to use or not use. I want it to be reasonably succinct and type safe.

I don't want the language to dictate how I use it. I'd prefer the language not to look out for me. There might be some, but a lot of languages look out way too much. Golang for example doesn't allow you to compile if there is an unused var. Java with private as the default.

It is great that there is a production-ready language that differs from other languages.

reply
neko-kai
6 hours ago
[-]
Every significant language became multi-paradigm these days, but you can do it intentionally, like Scala, or you can do it badly.
reply
SOLAR_FIELDS
6 hours ago
[-]
Python is multi paradigm, but does several things really well that other ecosystems do not. Javascript as well. Java as well. What claim to fame does Scala have in this regard, aside from being the best supported language for Spark for several years before PySpark overtook it? Perhaps Akka before the boneheaded decision to paywall that ecosystem?
reply
AdieuToLogic
3 hours ago
[-]
>> Every significant language became multi-paradigm these days, but you can do it intentionally, like Scala, or you can do it badly.

> Python is multi paradigm, but does several things really well that other ecosystems do not.

Both Perl and Ruby can be, and often are, used instead of Python to great success for similar concerns. IOW, the three are often Liskov substitutable[0].

> Javascript as well.

You're kidding, right?

> What claim to fame does Scala have in this regard ...

Scala supports declarative, generative, imperative, meta, and object-oriented paradigms. All of which are supported by at least, but not limited to, the JVM and JavaScript runtimes.

These capabilities transcend libraries (such as Akka) and/or frameworks (such as Spark).

0 - https://en.wikipedia.org/wiki/Liskov_substitution_principle

reply
mistrial9
4 hours ago
[-]
"Among the clients of the Spark runtime architecture, Scala is the most popular language, followed by Python and Java. According to a recent survey by Databricks, the company behind Apache Spark, 71% of respondents reported using Scala for Spark development, while Python was used by 24% and Java by 5%. Another survey by Typesafe on the Spark ecosystem revealed that 88% of respondents used Scala, 44% used Java, and 22% used Python, with the percentages reflecting multiple language usage. Scala is considered the most optimized language for Spark due to its integration with the JVM and its role as the language in which Spark was internally implemented, offering better performance and access to the latest features."
reply
csto12
3 hours ago
[-]
When is this from? I would be shocked if in 2025 most Spark was being written in Scala
reply
mistrial9
3 hours ago
[-]
reply
osdev
2 hours ago
[-]
Scala is a great language, and functional programming (not pure functional) made me a much better programmer. And functional error handling is a fantastic way to model success and failure, whether you’re using Either or the newer Result type.

I have to both agree and disagree with some of the commenters here regarding why scala declined in usage. There are several reasons.

1. People just got fed up with the push toward pure FP and the complexity. Pure FP and category theory, and effect libraries are just not for the average audience.

2. Android support for Kotlin drastically reduced the momentum as well

3. Spark usage was pretty heavy driver for using Scala and I’m not sure about it’s used as much.

4. Scala became more and more niche as a result of item 1 above.

This being said, I switched to Kotlin for all server side work. I think a language and in particular the ecosystem, needs the vision/stewardship that can offer more practicality and balance in the language design, programming style, tooling, and frameworks. Kotlin just became a simpler language with better support for all of the above.

I can’t think of a better company to drive the development than Jetbrains. I don’t agree with all the choices, but Kotlin overall is a beautiful, simpler language, with all the practicality, and support needed to keep it going.

However, now that Java is making strides in the language features, as compared to historical improvements at the VM level, I’m curious to see how the market share for Kotlin outside of android is going to be affected.

Personally, I still prefer Kotlin for the practical FP support, Ktor as an HTTP server, and pretty good compatibility with Java. And lastly, I think there is enormous potential in multiplatform, as a strong alternative to typescript/react native for mobile.

Disclosure: I am biased as I’m developing some libraries and soon to be made (more) public server framework.

reply
hocuspocus
1 hour ago
[-]
1. There was never a push. Functional ecosystems are simply the ones that survived. You can't blame communities that keep the language alive for doing what they want, and not what you want. Without Typelevel and ZIO where would be Scala 3's adoption today?

2. Android has never been even remotely relevant to the space where Scala exists. And no, this was not a missed opportunity for the language. People who think Scala had a shot are completely delusional.

3. I'm personally convinced Spark was the worst thing that happened to the ecosystem as it brought a lot of attention, and indeed, drove adoption, only to result in an incredible amount of shitty code plagued by the worst annoyances in the JVM and big data space. Spark is the biggest open source project in Scala, yet Databricks doesn't seem to give a damn about the language and couldn't even be bothered shipping a Scala 2.13 runtime for years after its release. I sincerely hope Spark moves away from the JVM entirely.

Kotlin is really not any simpler especially with the constant feature creep that results in copying Scala features, only halfbaked. It's even less principled which is the biggest gripe against Scala having too many ways to do the same thing. There's nothing beautiful or practical about a language where people regularly write expression oriented code next to early returns.

reply
Rochus
7 hours ago
[-]
It's interesting that Odersky started with Modula-2 (implementing a Z80 compiler), did a PhD with Wirth, but there discovered that functional programming offered a level of theoretical rigor and mathematical elegance he missed in Wirth's imperative languages. Wirth was generally critical of the complexity and abstraction often associated with functional languages. Rather than rejecting Wirth's pragmatism, he carried it forward by attempting to make functional programming "industry-ready".
reply
osdev
2 hours ago
[-]
Martin Odersky did a fantastic job with Scala then, and also with Scala 3 IMO from a language design perspective. When I first got into Scala, I was blown away by the language features and the type system. It was the reason I got back into the JVM and the reason for getting into functional programming (not pure FP).
reply
rubenvanwyk
53 minutes ago
[-]
Wanted to get into enterprise-level back-end development in 2025 and was really drawn to Scala, but ultimately learning C# or Kotlin seemed way more practical.
reply
wiradikusuma
1 hour ago
[-]
If you haven't checked Scala 3, give it a try. Its syntax is now Python-like (indentation based), although you can also use C style if you prefer.

And it's faster (or maybe my laptop is faster).

reply
pyrolistical
5 hours ago
[-]
I love scala case classes and pattern matching. Too bad the compiler sucked (too slow) and it had some rather large footguns like implicits
reply
kasperset
7 hours ago
[-]
Have error messages improved? I remember trying it few years back but the error messages made it hard to debug. Is it due to use of JVM? Sorry for my lack of knowledge since I rarely program in JVM based languages.
reply
cerved
6 hours ago
[-]
Do you mean compiler errors or some other kind of error message?
reply
vvillena
4 hours ago
[-]
Compiler errors got a lot better during the Scala 2.12 era.
reply
kasperset
4 hours ago
[-]
Yes. It might have been errors when using Apache Spark with Apache Zeppelin notebooks. However, I must admit it was long time ago (2015-2016 era).
reply
awaymazdacx5
3 hours ago
[-]
Disk partitioning labels: GPT, MBR, SUN, or BSD.
reply
semiinfinitely
6 hours ago
[-]
Answer: some PL prof used to do a lot of java back in his day
reply
ForHackernews
8 hours ago
[-]
Scala is a great language. It's a little bit disappointing that Kotlin is the JVM language that's gained so much traction instead.
reply
blandflakes
7 hours ago
[-]
They really obliterated their momentum with how they went about Scala 3, unfortunately.
reply
hibikir
3 hours ago
[-]
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.

reply
atbpaca
6 hours ago
[-]
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.
reply
hnlmorg
6 hours ago
[-]
I learned scala due to load testing with Gatling.

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

reply
spockz
7 hours ago
[-]
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.

reply
forgetfulness
6 hours ago
[-]
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.

reply
hocuspocus
1 hour ago
[-]
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).

reply
palata
6 hours ago
[-]
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?
reply
palata
6 hours ago
[-]
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?

reply
dboreham
7 hours ago
[-]
I've used both fairly extensively. Scala is just "too much". Kotlin is perhaps not enough, but that's better than too much.
reply
29athrowaway
8 hours ago
[-]
Except when you chain many collection operations... then it breaks horribly.
reply
tbct
8 hours ago
[-]
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.
reply
neko-kai
5 hours ago
[-]
Just use `.iterator` before chaining and the final collection will only be allocated once.
reply
ATMLOTTOBEER
2 hours ago
[-]
Ignore that person they don’t know what they’re talking about lol
reply