September 15th, 2017

What is Kotlin? The Java alternative explained

Development Tools, Enterprise Java, Java App Dev, Open Source, others, Programing, Scripting and JVM Languages, Spring Framework, by admin.

Kotlin is a general purpose, open source, statically typed “pragmatic” programming language for the JVM and Android that combines object-oriented and functional programming features. It is focused on interoperability, safety, clarity, and tooling support. Versions of Kotlin for JavaScript (ECMAScript 5.1) and native code (using LLVM) are in the works.

Kotlin originated at JetBrains, the company behind IntelliJ IDEA, in 2010, and has been open source since 2012. The Kotlin team currently has more than 20 full-time members from JetBrains, and the Kotlin project on GitHub has about 100 contributors. JetBrains uses Kotlin in many of its products including its flagship IntelliJ IDEA.

convert java to kotlinJetBrains

At first glance, Kotlin looks like a streamlined version of Java. Consider the screenshot above, where I have converted a Java code sample (provided by the Kotlin folks) to Kotlin automatically. Notice that the mindless repetition inherent in instantiating Java variables has gone away. The Java idiom

StringBuilder sb = new StringBuilder();

in Kotlin becomes

Back Top

Leave a Reply