3
What are the main differences between Java and Scala? Both have these similarities:
- Both are object oriented
- Both compile to bytecode and run in the JVM
- They both have Amble (Java 8)
3
What are the main differences between Java and Scala? Both have these similarities:
6
Run on JVM and compile to bytecode are implementation details and is not part of the language feature.
There are more important similarities, for example the paradigm most important of Java is the imperative and not object oriented. Already Scala uses the functional as much as it can. Imperative and functional are antagonistic, object orientation no and so it is present in both. Even so it is possible to have some of the imperative and functional together. Scala has enough, Java has started having a little bit.
Today both have functional characteristics. Scala was born like this and forces this paradigm enough. Java has been adopting this more recently and is still shy, an example is the use of lambda. In Scala this feature is better implemented. When the comparison is with more modern Java has less differences. Java decided it needed to get closer to Scala as far as possible. And newer versions should adopt more features.
null
).Browser other questions tagged java scala
You are not signed in. Login or sign up in order to post.
I think it’s worth, out of historical curiosity, what I’m about to say. Even in the time of Java 6, there was a great profusion of languages compiled for JVM (by default). And at the time the JVM was no help to those languages. There was then a congress of JVM-based languages, and there they suggested the bytecode invokeDynamics, as the Ambdas were a major performance problem. And that’s roughly how invokeDynamics came into being in JVM 7, even though it didn’t have lambda in Java 7
– Jefferson Quesado