Aricles related to

Kotlin

Kotlin: Improve readability by using the infix notation

Readability is a crucial part of any language, and Kotlin brings lots of syntactical sugar to make writing clean code easy. In this post, we're going to look at the infix notation and what is required for us to use it. What is the infix notation? The infix notation is…


How to create Maps in Kotlin using 5 different factory functions

Maps are a key collection type in most languages out there, so the ease of using them should be a given. In Kotlin, the collection API has been carefully created to make our job easier when working with collections. The syntax is concise, but still readable, and a huge set…


Kotlin: How to use default parameters in functions and constructors

From time to time you can end up having functions or constructors where the amount of information available varies for different usages. In these scenarios we want to be flexible enough that we can use the function even if we can't provide values for all the parameters. In Java this…