days
1
1
hours
2
3
minutes
3
4
seconds
3
2
JVM language update

Kotlin M11 hits the street

JAX Editorial Team
Kotlin "Hello World" via Kotlinlang.org

The JVM language Kotlin is celebrating its 11th release with over 220 bug fixes and a surprise for Android developers.

JetBrains, maker of popular development environment IntelliJ IDEA, has announced a new major release of Kotlin. The 11th version of the language aimed at Java and JavaScript programming platforms has stamped out as many as 220 bugs and introduced some extensive changes.

The latest from Kotlin

The one major language extension in Kotlin M11 that will impress most of its users also happens to be the most sought-after function from the Android community: secondary constructors – an essential feature for Android because subclassing standard view classes need more than one constructor. As explained in the Kotlin user docs, Android developers can do this:

class MyView : View {
    constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
        // ...
    }

    constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0) {}
}

But that’s not all the good news for Android developers. The all-new Kotlin Android extensions plugin gives the Kotlin compiler typesafe access to views. And it does so without the need for additional code or a runtime library – a rather elegant solution to the well-known problem of findViewById ().

This latest milestone also offers a first glimpse at Kotlin-specific reflection. Thanks to the new Kotlin-reflect.jar, which ships with the compiler, programmers now have the ability to introspect properties. Previously developers were forced to use Java reflection on Kotlin classes. The Reflection API works with Kotlin and Java classes alike.

Last but not least, Kotlin has also expanded its IntelliJ IDEA support and the JavaScript backend now provides better support for inline functions. Meanwhile, Parallel Universe has since commented on Reddit that it is “working with JetBrains’ Kotlin team to provide great Kotlin bindings for Quasar (true fibers on the JVM + Go-like channels + Erlang-like actors).”

Kotlin, for those who don’t know it

The language was developed by the Czech tool vendors JetBrains and is aiming itself at Java and JavaScript platforms. Statically typed, object-oriented, procedural programming using functions as well as support for Variable Type Inference and for closures – those are just a few of its key characteristics. And rather importantly, it can also be compiled to bytecode or JavaScript.

SEE ALSO: Type-safe Web with Kotlin

Kotlin has been open source since February 2012. The language was originally developed because, in the eyes of the JetBrains team, Scala was too complex, Groovy was too slow and Ceylon too Java-incompatible.

Comments
comments powered by Disqus