News

JVM-Targeted Kotlin M2 Released

JetBrains, the force behind the open source Kotlin project, announced this week the availability of Kotlin M2.

The second milestone release of the JVM-targeted programming language comes with a number of bug fixes, new language features and support for the Android operating system.

The new language features include four visibility modifiers (private, protected, public and internal), the ability to allow arrays to be passed to variable argument functions and adds a spread operator to convert arrays into vararg (variable arguments) lists.

The Prague-based maker of the code-centric Java IDE, IntelliJ IDEA, began developing Kotlin in 2010 and released it earlier this year for distribution under Apache 2 Open Source License.

Kotlin is a statically typed language similar to Scala, Gosu, Ceylon and Fantom. It compiles to both JVM byte code and JavaScript. The company has claimed that the language will be more stable at runtime than Java because it can statically check weak points and it supports things like variable type interface, closures, extension functions and mix-ins.

The company released the first Kotlin milestone (M1) in April with a plugin for IntelliJ IDEA. Kotlin M2 now compiles Kotlin code to JavaScript within the IDE. Users must install the plugin. Running Kotlin on Android requires the Android SDK, which is supported by the open source version of IntelliJ IDEA, as well as the Kotlin M2 build of the plugin.

JetBrains is continuing to work on the IDE plugin, the company says, and is "progressing pretty fast." The emphasis of that development is on performance and tighter integration with the Java IDE. The company points to some user-facing developments in the blog announcement, including: the IDE's ability to display error messages formatted in a "nice HTML-like way;" "Specify explicit type" refactoring; support for Cross-language Find Usages and Rename between Kotlin and Java code; and support for navigation to inheritors, among others.

The M2 release also improves on the integration with Maven and Ant build tools, the company says.

Kotlin project lead Andrey Breslav announced the latest milestone release on the Project Kotlin blog. Breslav listed among the plans for future Kotlin releases: a means of defining properties that turn into Java's static final constants; support for the concept of data classes: support for a dynamic type, "which is needed mostly to accommodate the JavaScript APIs that don't fit with the statically typed approach;" and improvement of the type inference algorithm.

Breslav said project supports also plan to provide "good library support for Android."

"We suspect that most of Android's XML files can be replace with Kotlin's builders that are much nicer in many ways," he wrote.

The blog includes links to examples and installation instructions. The full source code and other resources are available on the JetBrains/Kotlin Github repository.

(According to Wikipedia, Kotlin is the name of a Russian island located near the head of the Gulf of Finland, 20 miles west of Saint Petersburg in the Baltic Sea. One of JetBrains' development offices is located in Saint Petersburg.)

About the Author

John K. Waters is a freelance author and journalist based in Silicon Valley. His latest book is The Everything Guide to Social Media. Follow John on Twitter, read his blog on ADTmag.com, check out his author page on Amazon, or e-mail him at john@watersworks.com.


comments powered by Disqus
Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.