6 ms·
The Origins of Scala (2009)
- Zambyte 11mo agoScala 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).
- SOLAR_FIELDS 11mo agoyeah, 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.
- neko-kai 11mo agoEvery significant language became multi-paradigm these days, but you can do it intentionally, like Scala, or you can do it badly.
- SOLAR_FIELDS 11mo agoPython 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?
- mistrial9 11mo 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."
- csto12 11mo agoWhen is this from? I would be shocked if in 2025 most Spark was being written in Scala
- mistrial9 11mo agoAugust 2024 -- so, dated.. mea culpa https://moldstud.com/articles/p-what-programming-languages-are-commonly-used-in-spark-development https://moldstud.com/articles/p-what-programming-languages-a...
- shipman05 11mo agoI think the info is even more outdated than that. The article is from August 2024 but it cites "a recent survey by Databricks" that from what I can tell isn't linked to, so who knows what data they're referring to. I was deep into the big data ecosystem in the 2010s. Those numbers feel like they're from 2017 or so. Scala has been on a slide every since.
- AdieuToLogic 11mo 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 https://en.wikipedia.org/wiki/Liskov_substitution_principle
- pjmlp 11mo agoOne thing it clearly doesn't do well is performance.
- tanin 11mo agoThat 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.
- ForHackernews 11mo agoScala is a great language. It's a little bit disappointing that Kotlin is the JVM language that's gained so much traction instead.
- 29athrowaway 11mo agoExcept when you chain many collection operations... then it breaks horribly.
- tbct 11mo agoCan 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.
- neko-kai 11mo agoJust use `.iterator` before chaining and the final collection will only be allocated once.
- ATMLOTTOBEER 11mo agoIgnore that person they don’t know what they’re talking about lol
- blandflakes 11mo agoThey really obliterated their momentum with how they went about Scala 3, unfortunately.
- spockz 11mo agoWhy 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.
- deleted 11mo ago[deleted]
- kasperset 11mo agoHave 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.
- cerved 11mo agoDo you mean compiler errors or some other kind of error message?
- bearforcenine 11mo agoCompiler error messages improved significantly with Scala 3. IIRC there was a dedicated effort with Scala 3 to improve error messages and make them more actionable. Scala 2 error messages improved somewhat over time, but can still be obtuse.
- Rochus 11mo agoIt'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".
- pjmlp 11mo agoI can relate to Odersky, similar to him, while I appreciate Niklaus Wirth's work, I don't appreciate the quest to minimalism that he went down after Oberon. For me the right path is Oberon => Oberon-2 and Component Pascal => Zonnon and Active Oberon. Yes, I know he wasn't directly evolved with those ones. I see the several revisions of Oberon-07 as an entertaining exercise in minimalism, which fails to understand the industry. Something that Niklaus Wirth complained about in his rant about Software Engineering, not understanding why Java and C++ and not Oberon won the hearts of companies. I was fortunate to attend his Oberon session on Oberon Day at CERN, 20 years ago, while a genius programming language designer, expecting software engineers to recognise great design and naturally embracing it, was expecting too much.
- Rochus 11mo agoMinimalism is indeed the correct term (usually framed as simplicity) when looking at both, language and documentation. But at least it helped that there was always a working compiler and system, not a mere theory. > I see the several revisions of Oberon-07 as an entertaining exercise in minimalism, which fails to understand the industry. His main motivation was to minimize the amount of work porting his original system to his own, FPGA based processor board. His fans interpreted the “new” language more as a new prophetic proclamation, but in reality it was only about the feasibility of his post-retirement hobby project. This became clear at the latest when people wanted to run a benchmark on the system and discovered that the compiler couldn’t generate such large binaries. There was simply a fixed maximum size, but for many years no one noticed this. He has always positioned his languages for education and limited himself to the systems that can be realized with them. If his goal had been to meet the needs of industry, he would have acted differently. After a very brief foray to an industrial job in the sixties, he immediately returned to academia and hardly looked back.
- semiinfinitely 11mo agoAnswer: some PL prof used to do a lot of java back in his day
- pyrolistical 11mo agoI love scala case classes and pattern matching. Too bad the compiler sucked (too slow) and it had some rather large footguns like implicits
- deleted 11mo ago[deleted]
- awaymazdacx5 11mo agoDisk partitioning labels: GPT, MBR, SUN, or BSD.
- unit149 11mo ago[dead]
- osdev 11mo agoScala 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.
- hocuspocus 11mo ago1. 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.
- osdev 11mo agoMartin 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).
- wiradikusuma 11mo agoIf 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).
- rubenvanwyk 11mo agoWanted 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.
- Sunscratch 11mo agoI’m very happy that I learned Scala back in 2018(thanks to my colleague). I quickly realized that this is the language I want to use for work, and after some time, I joined my first Scala project. Five years later Scala is still my favorite language, along with Rust.