Which language is faster than java or scala, let's say there are two programs written using the same algorithm, only one is written in Java and the other is written in scala, which program will work faster?

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants AK , 0xdb , aleksandr barakin , user192664, Eugene Krivenja 18 Nov '18 at 12:07 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    This question should be closed, as it is based on personal opinions and gives rise to endless discussions - LFC
  • one
    And how can a rock be faster than a rock, if both are compiled into the same byte code? - aleshka-batman Nov.

1 answer 1

This question cannot be fully answered, since each language has its pros and cons. From Wikipedia:

The programming language of component software must be scalable in the sense that it must be possible to describe both small and large parts using the same concepts. Therefore, attention was focused on the mechanisms of abstraction, composition and decomposition instead of introducing a large number of primitives, which can be useful only at any one level of scaling.

Scalable component support can be provided by a programming language that unifies and generalizes object-oriented and functional programming. Some of the major technical innovations of Scala are concepts that are a blend of these programming paradigms. In statically typed languages, to which Scala belongs, these paradigms have until now been almost completely separated.

There is nothing said about speed, so it can be concluded that Scala, if not slower than Java, is not faster in any case, since Scala is developed on the basis of Java