Design Patterns In Kotlin: Singleton

The easiest pattern to be implemented in Kotlin (only one line needed) is also very controversial. Although many people claim that the singleton pattern is actually an anti-pattern and frequently misused, in this story we are going to see how we can implement it in Kotlin and that it can be very useful when used appropriatelly.

What is a Singleton?