JetBrains’ New JVM Language
New, statically-typed JVM-targeted programming language from JetBrains.
JetBrains have launched a new statically-typed JVM-targeted programming language, Kotlin. This project aims to be more concise and safer than Java, and simpler than Scala, which JetBrains refer to as “the most mature competitor.” The compiler emits Java byte-code, and Kotlin can call Java, and vice versa. Kotlin supports higher-order functions and function literals, its generics support declaration-site variance and usage-site variance, and Kotlin infers type arguments when generic functions are called, as well as types of variables from their initialisers.
At the Kotlin webpage, there is a simple Hello World example of Kotlin in action:
On the topic of ‘why do we need another new language?’ JetBrains argue:
“We know that Java is going to stand long, but we believe that the community can benefit from a new statically typed JVM-targeted language free of the legacy trouble and having the features so desperately wanted by the developers.”
At his blog, Cédric Beust, creator of TestNG, also argues that Kotlin is needed. He states that new languages are exciting, and that it’s likely Kotlin’s IDE support will be well-thought out, as JetBrains are building the compiler and the IDEA support in lockstep. He is also enthusiastic about reified generics, calling Kotlin “probably the very first time that we see a JVM language with true support for reified generics,” and is hopeful about the amount of effort JetBrains will put into this language, as its success will most likely translate into the sale of more IDEA licenses.
A public beta is planned by the end of 2011, and as soon as this beta is released, the compiler and the IntelliJ IDEA plugin will be open sourced under the Apache 2 license.