
Extension functions provide the C#-like ability to extend a class with new functionality without having to inherit from the class or use any type of design pattern such as Decorator.įor Groovy fans, Kotlin implements builders in fact, Kotlin builders can be type checked. In Kotlin, functions may be declared at top level in a file, locally inside other functions, as a member function inside a class or object, and as an extension function. It is not completely obvious from this example, but Kotlin has relaxed Java’s requirement that functions be class members. Notice that the mindless repetition inherent in instantiating Java variables has gone away. Consider the screenshot above, where I have converted a Java code sample (at left) to Kotlin automatically. IDG Kotlin as a more concise Java languageĪt first glance, Kotlin looks like a more concise and streamlined version of Java. JetBrains uses Kotlin in many of its products including its flagship IntelliJ IDEA. The Kotlin project on GitHub has more than 770 contributors while the majority of the team works at JetBrains, there have been nearly 100 external contributors to the Kotlin project. Kotlin originated at JetBrains, the company behind IntelliJ IDEA, in 2010, and has been open source since 2012.

Versions of Kotlin targeting JavaScript ES5.1 and native code (using LLVM) for a number of processors are in production as well.

It is focused on interoperability, safety, clarity, and tooling support. Kotlin is a general purpose, free, open source, statically typed “pragmatic” programming language initially designed for the JVM (Java Virtual Machine) and Android, and combines object-oriented and functional programming features.
