Skip to main content

Posts

Showing posts from August, 2019

Kotlin Learning Notes - First Impression

This is my first week of using Kotlin. Coming with a background of Golang for the last 7 years, I was surprised by the richness and smartness of such a "modern" language. This blog is to share some of my early thoughts on the language. Of course, I will share more of my learning experience, gotchas and thoughts going forward.

So here are my early thoughts:

Richness. Golang's design principle is to make language support minimal. One example is that there is no standard library for Set in Golang and it's common to use maps as an alternative. As a result, Golang code is usually verbose since a programer has to implement lots of low-level functionality. On the contrary, Kotlin has access to a large set of syntax sugars, lambdas, standard libraries as well as Java libraries. This makes Kotlin feel higher level compared to Golang, hence easier to write, but harder to standardize code style.Null safety. I love this feature! It saves tons of code boilerplate for checking nul…