<Why Kotlin chose "object" keyword and not "single...
# forum
r
Why Kotlin chose "object" keyword and not "singleton"? In reading documentation on Kotlin I often misinterpret the intent because of the word “object” in the text. I never read this as “a singleton”. To me (with my Java background) just about everything is an Object. An example of my struggle: If an object in Kotlin is a singleton, what is an instance of a class? It’s also taken me quite a while to come to terms with a companion object. The way I understand it is as follows : A companion object is a singleton that you create inside your class so...