|
|
|
|
|
by zmmmmm
2365 days ago
|
|
> > But I just mean that not every language needs to aim to be a top 5 language. > I wonder about the extent to which this is true. One of my primary considerations in picking the language for a product is economic fit. Once you get outside of the top 10 or so, I think you need an especially strong set of niche-specific positives to offset the negatives of a small community. I think you have to take into account the ecosystem in that equation. Scala may have less than 5%
programmer mindshare but it has access to the massive Java ecosystem underneath. So languages
like that I think get to be viable at a significantly lower threshold than languages that
require the whole ecosystem to be built from the ground up (even if that is mostly by
writing wrappers that FFI to C libraries). The risk is heavily mitigated by that as well,
as a retreat back to Java from Scala is far more doable than from say, Go or Rust
to Java if things turn sour. Scala is disadvantaged by the fact it philosophically departs from the
Java ecosystem (in terms of FP, HOF, etc), because
that pretty much ruins the interop story backwards into Java (that is, without effort,
your idiomatic Scala code / library is not going to be accessible idiomatically to Java
programmers). This is unlike Kotlin and Groovy both of which are built
intentionally to fit smoothly into the bigger Java ecosystem (although Groovy is more
so than Kotlin). |
|
Of course, there could be special-purpose stuff that's very nice not to have to rewrite. PDF generation comes to mind, as it's an enormous pain in the ass, and there are some good Java libraries for it. But it's often not much more work to encapsulate something like that as a service or a CLI tool.
Not to say people shouldn't do it, of course. But I'm not sure what Scala's niche should be as it shrinks. I originally saw it as a better Java, but I think Kotlin did a better job of is winning there. I get the impression that Clojure is doing better at "functional language on the JVM". Which is already a niche inside the FP niche. And given how much other languages have been learning from functional approaches, I don't know whether that niche is growing. I look forward to seeing if they find one.