Photo by Yan from Pexels Kotlin is one of the most loved languages in 2019 (following the StackOverlow Developer Survey). Thanks to this new popularity, it is no longer a replacement for Java but a new mainstream language. Yet, this new popularity also raises some onboarding issues for new users which don’t have Java background. My personal story with … Swift Around 2015, when Swift appeared, I was very excited to learn this new language to create an iOS app.
Mastering Kotlin indexed access operator
Indexed access operator in Kotlin provides an easy-to-read syntax for random-access like data structures like Array, List and Map, … But Kotlin is powerful enough that we can implement our own indexed access operator for our custom data structure. In this post, we will walk through a chessboard example to understand better this operator and also operator overloading in general. You might have seen it, many times If you have ever called the set/get method on a List/Array/Map on Kotlin,
Using Kotlin scope functions to create deeply nested Java objects easily
In some cases, especially when working with an API with a provided Java SDK, we often find ourselves in creating a (very) deeply nested Java object using setters. Creating Java object with a lot of setters is annoying and error-prone. Kotlin scope function can help to make our code much more readable in these cases.