Why is Kotlin compiling faster than Scala?

When we read the wikipedia description of the Kotlin programming language, it states that:

JetBrains host Dmitry Dzhemerov said most languages ​​do not have the features they were looking for, with the exception of Scala. However, he called the slow compilation time of Scala an obvious flaw [4]. One of Kotlin's stated goals is to compile as fast as Java.

How did they achieve this goal? And why is Scala compilation time so slow that it was unacceptable to the creators of Kotlin? Or, in other words, what features of the Scala compiler make it slower than the Kotlin compiler?

+4
source share
1 answer

, Stack Overflow, , , : , , , , " " , . , Scala. , , , , inferencer , .

, : Project Euler Kotlin Scala. :

  • 6 Kotlin ( 5 )
  • 10 Scala ( 7 ).

:

  • Kotlin, , , , , .
  • Scala sbt , object pXY extends App { ... }, euler.

, , 26 . IntelliJ IDEA 15 CE, Rebuild Project.


, wc ( ) :

// lines words bytes
931  3603 33087 total  // Kotlin
261  1166  6472 total  // Scala

, , Kotlin " " Scala " ":)

+24

Source: https://habr.com/ru/post/1622940/


All Articles