kotlin

Kotlin

Back in February, JetBrains released version 1.0 of their JVM language, Kotlin. Read that blog for more on what Kotlin is, but their summary is:

Kotlin is a pragmatic programming language for JVM and Android that combines OO and functional features and is focused on interoperability, safety, clarity and tooling support.

The Kotlin reference docs contain a comparison to Scala and “Why a new language?” in the FAQ which together, in my view, make it quite clear what the creators of Kotlin were trying to do: create a language with some of the benefits of Scala over Java, but “focused on interoperability, safety, clarity and tooling support”.1

If you use Java I highly recommend you take a look. To get a flavour of why you might use it, the idioms page is pretty good; to start learning to write Kotlin code, I think the best way to get a feel for it is to dive in with the Kotlin Koans, which you can either clone from GitHub and solve in your IDE, or use the rather amazing in-browser experience at try.kotlin.org. (It even has Ctrl-Space autocompletion!)


Image credit: photograph of Kotlin Island, St Petersburg, by vlad10531 is licensed under CC-BY-SA 3.0


  1. I don’t know much about Scala, but I understand that many people criticise it for lacking in some of these attributes.