BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Kotlin Open Sourced

by Alex Blewitt on Feb 14, 2012 |

JetBrains, the company behind the popular IntelliJ Java IDE, have open-sourced their Kotlin programming language under the Apache License.

The basic compiler (which they call kompiler, starting a new legacy of K-prefixed terms – even kontributors, which they are looking for …) is available separately and can be embedded in Maven, Ant or Gradle toolchains. This allows code to be developed in the IDE to be built with existing mechanisms, requiring minimal intervention in order to use in a new environment, or even if working on a project with other developers who do not have the Kotlin plugin installed.

The IntelliJ Kotlin plugin extends the Java compiler to allow Kotlin code to be written, compiled and debugged. In addition, helper functions have been written for the basic Java collections, which allow a more fluid interface ahead of the Collections extensions coming up in Java 8.

There are separate Kotlin to Java comparison and Kotlin to Scala comparison papers available, compare and contrasting the features of both. Whilst Scala may remain more powerful, Kotlin tries to be a better Java with functions, mattern matching, null pointer avoidance and generics. The language also supports traits and pattern matching.

The Kotlin plugin will be available in a future release of IntelliJ (though the Early Access Program has preview builds available, and snapshot builds of Kotlin are available via the JetBrains GitHub page). However, you can get a feel for the language now with a web-based demo which allows you to edit Kotlin code, compile and run via your web browser.

Kotlin, like Xtend, is aiming to be a better Java rather than an entirely new platform. Both compile down to bytecode (although Xtend translates into Java source first and lets the Java compiler do the hard work), and both bring functions and extension functions (the ability to statically add a new method to an existing type within a limited scope). Whilst Xtend is Eclipse-based, and Kotlin is IntelliJ based, both have headless builds. The winner might just be the language which evolves to the other IDE first.

can be reached on Twitter as @alblue and blogs regularly at alblue.bandlem.com.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Xtend? by Ronald Miura

I haven't heard of Xtend yet. Interesting, but... if it generates java sources, and then javac/ejc compiles it into the final bytecode, I suppose the debug information is about the java sources, not Xtend sources, which would make it completely useless. I'd just hate having to debug generated code...

Re: Xtend? by Sven Efftinge

Debugging is a tooling aspect. JSR-45 to the rescue : vimeo.com/26046484

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT