Skip to content

Blog

87 posts · page 10 of 11

Extension function is a magic

1 min read

This is one of my most favorite features of Kotlin - Extension Function. Imagine this. You are using a 3rd party library - String that have all the things that I would need for text manipulation- alm…

Named and Default Arguments

1 min read

One thing that annoyed me mostly while I was working in Java is the arguments in the function. If you have a function that requires more than 3 arguments, it becomes cumbersome - we have to ensure th…

Property Accessor

1 min read

If you are new to Kotlin, there is something in property accessor that you might find it interesting. There are two methods - get() for getter and set() for setter for each property.

Map in Kotlin

1 min read

So we have seen the wonderful [Set][set-in-kotlin]. Next, we are going to look at Map.

Infix notation in function

1 min read

Another Kotlin treasure that I have not known is the ability to write infix notation in function. We use infix notation in most arithmetic operation such as a + b. The infix notation is where the ope…

Set

1 min read

In computer science, Set is an interesting abstract data type that stores unique values. It is a collection that allows only one element of each value.

Why package

1 min read

A fundamental principle in programming is the acronym DRY: Don't Repeat Yourself.