Recs.
Updated
SpecsUpdate
Pros
Pro Java interoperability
Since it runs on the JVM, Kotlin is 100% interoperable with Java and can use existing Java frameworks and libraries.
Pro Officially supported for Android development
Starting with version 3.0 of Android Studio, Kotlin support will be built-in. This means that it's now easier than ever to use Kotlin for existing Android projects or even start writing Android apps only with Kotlin from scratch.
This also means that Kotlin and Kotlin plugins for Android Studio will be fully supported in the future and their likelihood of being abandoned is quite small since Google is fully embracing the language for their Android ecosystem (alongside Java and C++).
Pro Supports Coroutines
Coroutines let you write highly asynchronous code without the kind of "callback hell" this normally entails. You can view them as threads which use virtually no resources when waiting on something.
Think of them as a more general and more flexible version of Go's "goroutines".
Pro Low effort to adopt
Kotlin can be set up and running even in existing projects in a matter of minutes. Seamless Java interop means you don't have to rewrite anything.
Pro Amazing IDE support
Since Kotlin is made by Jetbrains (the developers of IntelliJ IDEA), and the support in IntelliJ is top notch as a result. You have all the smart assistance you're used to from Java and other languages, a REPL, and even a bytecode-viewer and decompiler in case you're not sure what's going on behind the scenes.
Pro Good Android support
Kotlin compiles to Java 6 bytecode, and therefore brings modern features like lambdas and functional programming even to Android devices that don't have Java 7 or 8 support. There is also Anko, a Kotlin library that makes a lot of boilerplate code that's typical for Android unnecessary, like view lookup and async tasks.
Pro Is built to solve industrial problems
Kotlin has been designed and built by developers who have an industrial background and not an academic one. As such, it tries to solve issues mostly found in industrial settings. For example, the Kotlin type system helps developers avoid null pointer exceptions. Reasearch languages usually do not have null
at all, but APIs and large codebases usually need null
.
Pro Low-risk adoption for existing Java codebases
Since it has such a good interoperability with Java, Java libraries, and Java tools, it can be adopted for an existing Java codebase at little to no cost. The codebase can be converted from Java to Kotlin little by little without ever disrupting the functionality of the application itself.
Pro Easy adoption for existing Java programmers
Kotlin runs on the JVM and Java interoperability has been one of the main objectives since the language was born. It runs everywhere Java does; web servers, mobile devices (Android), and desktop applications. It also works with all the major tools in the Java ecosystem like Eclipse, IntelliJ, Maven, Ant, Gradle, Spring Boot, etc.
All of this makes adoption extremely easy even for existing Java projects. On top of this there's also ensured Type safety and less boilerplate code needed.
Pro Concise
Takes e.g. 1/3 less code than the equivalent Java. Less boilerplate means less time reading, writing, and debugging.
Cons
Con The need for Java interoperability has forced some limitations
The need to make Kotlin interoperable with Java has caused some unintuitive limitations to the language design.
Recommendations
Comments
Flagged Pros + Cons
Con May be hard for programmers already used to imperative style to learn functional programming from Kotlin
Since Kotlin does not enforce any particular paradigms and is not purely functional, it can be pretty easy to fall back to imperative programming habits if a programmer comes from an imperative background.