Scala Resurrection
I was a big fan of the Scala language some years ago and really like the improvements made in Scala 3. But I lost my confidence in Scala and the article is more a confirmation of this assessment than something that would give me hope that I would return to this powerful and beautiful language in the future.<p>Let me go through some of the points of this excellent write-up.<p><i>&gt; However, Java has a very simple type system that is static and well-defined. Scala’s type system is extremely complex and defined only by the implementation, which itself has numerous quirks, edge cases, and of course bugs. Moreover, the semantics, quirks, edge cases, and bugs all vary somewhat between minor versions of the Scala compiler, and are completely different between major versions.</i><p>This is a very good summary of why Scala is not a good fit for tool support.<p><i>&gt; Perhaps their next-generation editor Fleet is an acknowledgement both of the fact that JVM desktop applications are truly dead</i><p>The author probably doesn&#x27;t know that Fleet is also built upon the JVM!<p><i>&gt; The truth is Fleet is built on a reliable, performant and wonderful platform called the JVM.</i><p><a href="https:&#x2F;&#x2F;blog.jetbrains.com&#x2F;fleet&#x2F;2022&#x2F;01&#x2F;fleet-below-deck-part-i-architecture-overview&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.jetbrains.com&#x2F;fleet&#x2F;2022&#x2F;01&#x2F;fleet-below-deck-pa...</a><p><i>&gt; In short, there are no IDEs for Scala right now with a modern experience suitable for commercial software development, nor any obvious path to a commercial-grade IDE.</i><p>Even the best Scala IDE (IntelliJ IDEA) is poor and nothing better is to be expected in the next years. This is basically the point where you could cross out Scala from your short list of programming languages!<p>Akka, once the most prominent Scala framework, is essentially doomed since the company behind it decided to switch to &quot;Business Source License&quot;.<p><i>&gt; Thus, every company I have talked to about Akka has told me they are ripping it all out.</i><p>The former killer application of the Scala ecosystem no longer drags any new developers into it.<p>ZIO as a potential Akka (and Spring) alternative is stil not mature, so probably not the reason to switch to Scala.<p><i>&gt; It is virtually impossible for Java or Kotlin code to call into Scala code. [...] Scala’s support for newer versions of Java, as well as new JDK or JVM features, lags behind. When the JVM gets value objects, for example, it is quite likely Scala support will severely lag; or as another example, the Scala compiler itself has been known to crash on modern JVMs.</i><p>I&#x27;d say that Scala is not a good citizen in the Java world. This is problematic in existing code bases. Kotlin is a much better fit there.<p>Scala Native (LLVM) and Scala.js or WASM are far from production ready yet. One major problem is missing tool support and I can not imagine any responsible software engineer would pick it as the basis for a new critical product. If anything else than the JVM is needed as a runtime, you should probably use somete other language, maybe Rust or Go (or Kotlin?).<p><i>&gt; It is absolutely true that Scala 3 is not a perfect language. It is also true that Java is not a perfect language. Yet Java remains backward compatible with the very first Java program ever written, which allows the ecosystem to continuously improve, and which gives companies confidence in investing in the Java programming language.</i><p>That is absolutely the core of the &quot;Resurrection&quot;. The Scala community was too long focussed on the language itself ignoring all other aspects like tooling and existing code bases. Maybe this is no surprise if you look at Scala&#x27;s history, but it is a big problem in practice. The best language is worth nothing if everything else is poor compared to the competition (be it Java, Kotlin, Go, Rust or whatever ...). Essentially Scala is the Haskell of the JVM, but the Haskell community decided early on that academics is their focus and that it should stay that way. However, Haskell is therefore a niche language in commercial projects. The Scala community should really make a bold decision for one of the sides, but it should no longer wander between the two camps.<p>As the author writes, Scala need completely new tooling: a new IDE, a new build tool replacing the horrible SBT, and a new package manager. But who should build it in a sensible time? Who should invest money?<p><i>&gt; Does Scala really need 20 JSON libraries, 5 schema libraries, 9 CLI libraries, 4 effect system libraries, and so on? Probably not. We need to consolidate, and rally around strong projects; merge our strengths, cancel our weaknesses.</i><p>This assumption is simply not realistic. What was the original motivation to create those libraries? Has anything fundamentally changed? It is not like in a big corporation where you would should down one of two competing projects (like Microsoft did with Atom in favor of VS Code). Just look at the Linux desktops ...<p>&quot;Worse is better.&quot; (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Worse_is_better" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Worse_is_better</a>) seems to apply to Scala very well. Go, which is probably on the other end of the spectrum of programming languages in expressiveness and the type system, is probably a much better bet for most companies. Java is also quite good these days and in any case &quot;good enough&quot; for almost all commercial projects (as long as technical constraints don&#x27;t require something without a VM). Kotlin is somewhere between Scala and Java, highly productive with world class tooling and a healthy ecosystem. I can not really see in what niche Scala could exist.<p>So, as sad as it might be, I think Scala has no bright future.