Singleton in Kotlin
Adi Nugroho
2061

Why not simply use object instead of class:

object Singleton {
var b: String? = null
}

You get all the lazy initialization you need:

Singleton.b = "foo" // class is initialized at this point
println(Signleton.b) // prints "foo"