4 ms·
It's not "nonsense" or "stupid" to think that Java will adopt more Scala features over time. You have to put Java in its historical context to understand how i
by reality_czech 11y ago
It's not "nonsense" or "stupid" to think that Java will adopt more Scala features over time.
You have to put Java in its historical context to understand how it came to be. It was a mid 1990s over-reaction against the super-complicated, super-fragile software that people were churning out with C++. It was designed as a kind of babytalk that would avoid the complexity of speaking C++. Of course we all know it was an over-reaction, leaving behind perfectly reasonable ideas like multiple return values, lambdas, and unsigned numbers in a kind of French Revolution against C++ silliness.
Scala is also an over-reaction in the other direction. It's like a cross between Perl and one of the more pragmatic ML dialects. It's easy to churn out a lot of Scala code, but hard to read someone else's or debug a Scala program. (Case in point: seeing <anonymous> for every stack frame in backtaces.) Eventually we will want to meet in the middle somewhere with regard to complexity, and Java is best positioned to do that.
- lmm 11y agoEventually we're all dead. I don't think Scala will be the best language to use in 10 or 20 years' time. I do think it's the best language to use today (and I won't be leaving it until I see an alternative with higher-kinded types, dependent types, strict evaluation, and project/dependency management as good as maven).
- Philipp__ 11y agoWe are all eventually going to die... It's not about will Java adopt more Scala features, it is about how will it look when it is all glued together. I think for Java it can only go for worse, since language is massive as it is right now. Adding more would only bring more confusion for the table. Also good question is how will it work with other components of same language. I am not programming in Scala, I mostly read about it and read it. Still on faculty, but few older friends of mine, who have finished faculty 3 years ago and started to work at local startup/small company all worked in Scala and they are amazed how good everything goes for the company and that couldn't but notice that "Developer Happiness" factor being pretty high. So all those things considered tells you something...
- pkolaczk 11y agoOn side note: Lambdas and full generics were considered in first drafts of Oak (later Java). C++ did not have lambdas those days. They were dropped from Java because of project deadline pressure and no time to do them right, not some ideology. > It's easy to churn out a lot of Scala code, but hard to read someone else's or debug a Scala program I see this argument a lot in Internet forum discussions, but I've never met anyone who actually had problem reading production level Scala code more than problem reading Java code. Sure, people love to bring on Scalaz and other extreme type-level coded Haskell-like libraries where things can get hairy, because they're solving a complex problem. These people fail to show Java-equivalent of such complex Scala code, so a conclusion that Scala was complex is invalid. However, when comparing things solving similar problems for which we have a Java project and a corresponding similar Scala project, let's say Apache Spark and Apache Hadoop, Spark's code wins in readability hands down.