Important notice about this site

I graduated from the University of Texas at Austin in December 2020. This blog is archived and no updates will be made to it.

Getting kot up with Kotlin

July 12, 2020

That was a terrible pun, but it was the best I could come up with.

I've heard people say how great of a language Kotlin was. I didn't quite exactly understand why until I learned Swift and TypeScript. Now, I can understand how these two languages greatly improved their predecessors (Objective-C and JavaScript, respectively).

Kotlin is aimed to be an improvement over Java. Some of the key problems in Java, such as its verbosity (Java takes forever to write) and its lack of null safety, are addressed quite well by Kotlin's features. There aren't any groundbreaking innovations that come to mind, but it significantly improves the quality of life for a Java developer. And as someone who has wasted countless hours of productivity debugging a null pointer exception lurking deep within enterprise-scale code, I know very well how important it is to have proper null safety. Java optionals in Java 8 simply don't make the cut with its clanky syntax, in my opinion, compared to the vastly superior null safety mechanisms you see in Swift, TypeScript, and Kotlin.

If you haven't made the switch from Java to Kotlin yet, I recommend you do so as soon as you can. Kotlin interoperates with Java code because both compile down to JVM bytecode. There's a very low switching cost; it's possible to simply create new files in Kotlin and use the existing Java code, with no need of writing wrappers or anything silly like that.

If you already know Java and a language similar to Kotlin like Swift or TypeScript, I recommend reading this 5 minute quickstart. It'll not only give you a good overview of Kotlin, you'll feel like you'll know Kotlin by the end of the guide. Learn the Kotlin programming language

If you know Python and want to learn Kotlin, there's a 15 minute guide located on the official Kotlin language website: Migrating from Python

If you want to learn Android development with Kotlin rather than Java, which has been recommended as of Google I/O 2019, check out this guide: Android Basics in Kotlin

Back to blog

Back to top