Hacker News new | ask | show | jobs
by blackoil 2054 days ago
In my company (10k+ devs) Scala seems to be losing steam. All the enthusiasts have moved to Go/Rust, while the pragmatics are staying in (moving back) in Java. No new major project is being built in Scala.

Does anyone share this experience?

10 comments

Medium company (low hundreds of devs). My team is starting some new projects in Scala, which will be the first Scala at the company.

So far it’s going okay. But I personally am surprised at how disinterested most folks are in learning anything new.

> am surprised at how disinterested most folks are in learning anything new.

same here, we don't do Scala but it's basically impossible to get people here to learn something new. Introducing a new language (like Scala,F# etc) would be impossible.

Why did your team choose Scala , assuming you are bound to the jvm what sold Scala over kotlin or Java.
The tl;dr is we had absolutely no good business reason to choose Scala, and very few technical reasons. It is mostly a developer happiness gamble.

A secret ulterior motive of mine was that Scala has bad support for Spring. Every other Java service at the company uses Spring, and I abhor it, so if I can drive adoption of Scala on my team then we can avoid Spring and also provide pressure to make all our shared JVM libs Spring-agnostic (which I believe is a good move in general).

Scala was the first serious attempt to break Java's stranglehold on the JVM that made any impact. A lot of people got very excited by it.

But then Kotlin, Ceylon, Clojure and others started to steal it's thunder and now it's just "one of the pack".

In fact, I'd say Java itself has stolen back from all those other languages to a large extent, with its language enhancements since v8.

With the exception of Ceylon (because it's basically dead), there's actually a really nice gradient on the JVM these days:

Clojure is a nice, expressive, dynamic language that is really great for messing with arbitrarily-shaped data.

Java is a workhorse language that has been powering businesses small and large for decades.

Kotlin is a modern spin on Java, and the degree to which they share functionality (with differing or identical semantics) over time will be interesting.

And then Scala exists for all your meta-type-wankery needs.

It seems natural that Kotlin/Java would be most popular over time, with Clojure and Scala hanging out with small amounts of market share.

My company uses Java for most things.. some python for scripting. There are a few of us who use Scala because of the work we do (Spark). I have to say that I prefer it over Java, and Spark is great for what we use it for. The functional features allow you to be concise and require a bit of creativity which makes it fun to work in. However, I doubt that I would use Scala outside of Spark. I think it's mostly because other typical frameworks that get used are Java-based so I would just code in that. That seems to be true of most of what I've done professionally: the framework or platform that makes your job easier (or even necessary) usually seems to require some specific language. (e.g.) When I coded a lot in IOS, it was Objective-C and then Swift (liked them both); a lot of web frameworks use Java or Python; front-end dev : javascript. At some point, they all just feel the same to me, to be honest. Some I like more, some I like less.. but the process is usually about the same. Clearly there seems to be the theme in the industry to move general-purpose development closer to machine-code (away from JVMs and the like).. Go, Rust, Swift, Lua, Dart are some examples. I think this is generally a good thing. At some point, Spark alternative will appear that will probably be written in Rust, if I had to guess... (Vega? or whatever it's called)
My experience as a freelancer is that the two camps are:

- enthusiasts who will stay with scala

- others who think they should have used kotlin/java from the beginning.

The latter camp is bigger and growing.

Enthusiasts moving to Rust (and Haskell), sure. But Go? That's definitely a language for the pragmatics, right alongside Java.
In my experience people just moved to Kotlin. Hardly seeing any new projects in Scala, except maybe for Spark and such. It is mostly just maintenance at this point.
I think the big gap between releases was part of the problem. 2.13 took forever and frankly there haven't been any must-have new features since 2.11. So Scala is no longer new and exciting. But it's still the best at what it does.

I mean, if Rust had higher-kinded types, and the established library ecosystem, and the IDE support that Scala does, then I'd move to Rust too. But it doesn't. When you have a large codebase and need to manage cross-cutting concerns, the only thing that can do that as well as Scala does except Haskell (or more obscure options like Idris), and the state of Haskell tooling is miles behind Scala. I'm not attached to Scala for Scala's sake, but it's still my first choice.

In my environment Kotlin has won the better-Java use-case quite thoroughly.
What I'm seeing is that Scala devs I know have started using Kotlin (including me). It is a much more pragmatic language that doesn't try to reinvent the wheel, like Scala does.
Same experience here. JDK11 and beyond added some more enthusiasm to base Java. If Loom lands I think a lot of people will also lose interest in Kotlin as well (because AIUI a big draw for Kotlin is the async story).
I completely disagree. The best things in Kotlin has nothing to do with coroutines, it is the extension functions and the soon-to-be released typeclasses (multiple receivers). Java is lagging behind, while Kotlin gets pragmatic and useful features very frequently.
I have some friends/colleagues who use kotlin in personal projects and they enjoy it. But I've never heard them talk about those features. And they certainly aren't enjoying it now because of soon-to-be-released features.

But I am interested to learn more. Do you know any good resources?

I think the soon-to-be-released features anxiety is applicable for any language, it is not unique to Kotlin. A good resource for this is the Kotlin Koans for example or the Kotlin STDlib itself. I also maintain some OSS projects that use these things extensively (pun intended). What's also present in the language is the multiplatform functionality. You can't do this in Java and you probably never will be able to do it. With this I think Kotlin is one of the two languages that's capable of isomorphic behavior all across the board (you can write everything in Kotlin).
Most Kotlin devs I know are not particularly interested in coroutines. There is a lot more to like about Kotlin: native function types (instead of functional interfaces), unified type system, bottom type, Unit type (instead of the special case "void"), extension methods, no checked exceptions, sealed classes ...