Even putting aside my great dislike for Scala (which I discussed on HN ad nauseam :)), I think everyone would agree that Scala has a very different philosophy from Java. Java has been designed as a "blue-collar" language, with maintenance of a large project with possibly hundreds of developers as a central guiding principle. C#, Go, Dart, Kotlin, Fantom etc., have a similar philosophy. But Scala is a different beast altogether. You can love it or hate it, but even its most enthusiastic fans would concede that it is most certainly not appropriate as a replacement for Java in some/many/most (depending on your view) circumstances.
Also, Java is extremely popular, and some of its most painful points have been addressed in Java 8. Even an arguably better language (regardless of its name) will not easily replace Java. Hey, look across the browser at JavaScript. There are arguably better languages there; are they replacing JavaScript?
If you look just at GitHub – which is greatly skewed towards new languages – you see that all other JVM languages put together make about 10% of the JVM ecosystem, with Java being the 90%. Outside of GitHub, in "the real world", the situation is even more strongly in favor of Java. I don't know if this is going to change much in the next few years.
I don't mean that you shouldn't use an alternative JVM language if it makes your work better, and there are many viable and very useful alternate JVM languages – personally, I like Clojure and Kotlin – but you can't just "replace" Java so easily. I think efforts to reform the Java ecosystem are more likely to succeed – at least in the short term – than efforts that require switching to a different JVM language.
I wouldn't say that Java is extremely popular by any stretch. It's ubiquitous, but people aren't falling over themselves to become Java programmers anymore. I'd say Java is much less popular than it used to be (and I've run a Java Users' Group for 13 years). The JVM is still popular, but Java the language's popularity is arguably at a low point.
I agree that Java is widely adopted (thus my 'ubiquitous' comment). The fact that the commenter followed-up immediately with "some of its most painful points have been addressed in Java 8" led me to believe it was referring to being liked and not necessarily to being adopted.
I meant adoption, but mentioned that some of the issues that make it less well liked are being addressed.
I think it possible (though far from inevitable) that another JVM language will achieve dominance on the JVM, and it is very possible that Java will fall below the 60% or even 50% on the JVM (with the rest being taken by several, though not one dominant, languages). But this is still some years in the future.
That seems to be a pretty popular opinion among the Java pros that I know. Some of the early Scala adopters seemed to believe that, and many are likely still of that opinion. It may take years for an alternative JVM language to be dominant in terms of overall code, but might not be quite as far off when using a metric such as 'new projects'.
On what do you base your assumption when you say nobody would recommend Scala as a replacement for Java? Scala has actually taken great pains to maintain seemless Java interop for this very reason.
It IS an improvement on/replacement for Java in most situations.
That's not what I said. I said that no one would say that Scala can replace Java in all circumstances. Opinions vary greatly on what percentage the appropriate circumstances are (I think Scala is rarely a good replacement and never given the alternatives, while others, like you, say it's a good replacement in most circumstances - but not all).
In short, no one (who knows the software development landscape well, that is) can say Scala (or some other JVM languages) makes Java redundant.
I strongly contest that assertion. I'd say an honest variation would be the dream of scala is an improvement.
Maybe when some of these new fancy tools like Graal become more polished and ready the dream that was scala can start to happen vs reality you get when using it. I'd be happy to see that happen.
Implicits, SBT being anything but simple, and compile times. :) People have suggested sticking to a subset of Scala for most purposes, but what happens when you run into a problem with a library? Suddenly, you're diving into Slick (from a friend's example) or Play (from a personal, painful example) and can't make heads or tails of the code because of how different the paradigm is.
Frankly, I'd rather just go to Erlang and skip all the compromises needed to stay with the JVM if I want that kind of language.
What did you find painful about Play? I've dived into its internals a number of times, including to submit a performance fix a few months ago, and I've found it to be quite easy to understand.
I mean the most hated implicits are implicit conversions and they basically exist for Java compatibility.¹
So on the one side you have terrible stuff hard-coded into the language (Java, C#) which you will never get rid of and on the other side you have a solution as a library which you just can de-import if you don't want to suffer from e. g. magic anything-to-String conversions any longer (I certainly won't).
That's a huge plus in my book.
¹ The two other main use cases, type classes and extension methods, seem to be hugely popular and I haven't seen any criticism concerning them.