How much of this would be due to actual language features, and how much due to selection bias induced by talented and ambitious software developers looking into functional programming languages as a means to satisfy their intellectual appetite?
How much of this would be due to actual language features, and how much due to selection bias induced by talented and ambitious software developers looking into functional programming languages as a means to satisfy their intellectual appetite?
In terms of talent there is definitely some self-selection as with any non-default tech stack. Scala is a sharp tool and there are both people who are attracted to it for the pragmatic utility of its sharpness, and people who are attracted to it for wanting to play with sharp things. Both types are smart but the latter group have given Scala a bad rep in the past for being too smart and thus writing code that was too clever for others to understand. But nowadays the general vibe in the talent pool is a lot more pragmatic.
Wouldn't you want to use Kotlin for the latter these days? It seems to have broadly wider adoption than any "plain" variety of Scala.
Scala was always much more elegant and actually going the extra mile.
Kotlin as a language is also closer to Java on the Haskell <---> Scala <---> Java spectrum. We just don't want to move in either direction on that spectrum, Scala sits perfectly where it makes sense to us.
It's interesting that some people here are saying that Java's recent improvements will eat into Scala's market, when actually, it seems that it will eat into Kotlin first.
I'd rather work with Scala devs on a Java codebase than Java devs on a Scala codebase.
It's not about intellectual appetite though. It's about not re-litigating the same crap at every new work place. Avoid mutability and nulls where possible, etc.
And Java devs on a Scala codebase is effectively the norm once your project enters BAU/maintenance phase.
https://github.com/Iltotore/iron
Shifts entire classes of errors to compile time.
But once it clicked, it's been a joy to work in.