When the discussion of peripheral JVM languages arises, the discussion typically drifts toward the ways in which difficult issues like concurrency, multithreading, simplifying the type system and writing less verbose code on the server side can be addressed by using a language like Clojure or Scala or Groovy, as opposed to coding in the JVM's namesake of Java. But what about cleaning up your Android code? If JetBrains has anything to do with it, the company's new JVM language, Kotlin, will simplify the development of both UI-based and headless Android applications.
"The Android runtime is a little bit behind, compared to what server-side people have, because the runtime only supports Java 6, and that's limited in terms of language features," Andrey Breslav, lead language designer of Kotlin at JetBrains, said.
Kotlin v1.0 released
If you've never heard of Kotlin, don't feel bad. Keeping up as a new JVM language hits the market is challenging. Plus, Kotlin only released the full increment 1.0 version on Feb. 15, so you're forgiven if the language has flown under your radar.
The Android runtime is a little bit behind, compared to what server-side people have.
lead language designer of Kotlin
The JVM language is full-featured, capable of being used to develop a new project from the ground up, and it can be used either as a DSL or to supplement existing code. But Breslav is most enthusiastic about organizations interested in adopting the language for greenfield projects that need to be done right. "Kotlin is not a domain-specific language where only some code should be written in Kotlin and the rest written in Java," Breslav said. "If you have a Java code base, you can introduce Kotlin into it and have the newer parts in a more comfortable and more pretty language," but for those starting from scratch, "it makes perfect sense to start in Kotlin and do it end-to-end in Kotlin."
Simplified Android development
Beyond its applicability to server-side development, it's the smartphone arena in which Android developers might find Kotlin to be of the most value. "Kotlin offers very nice features in terms of DSL builders for UIs [user interfaces]," Breslav said. "You can create dynamic UIs with type-safe builders, so you can have in the code what you used to have in XML or somewhere else." Especially when the user interface gets complex or needs to be dynamic, a great deal of time and effort will be saved by integrating Kotlin into the code base.
It's an interesting move, as JetBrains adds the new JVM language to its already well-received portfolio of integrated development environments like RubyMind and IntelliJ. To hear more about Kotlin and what it has to offer both server-side and Android developers, listen to the podcast with Cameron McKenzie and JetBrains' Breslav.
How would your android development projects benefit from integrating a new JVM language like Kotlin into them? Let us know.