why can’t we add a constructor to a object class{...
# kotlin-native
b
why can’t we add a constructor to a object class{}?
e
Because
object
means an instance, not a class, so you cannot instantiate it and therefore a constructor doesn't make sense
b
thank you
🤘 1
so what is the difference from a object class{} vs a singleton?
e
no difference, in Kotlin
object
is meant for implementing singletons
btw, #getting-started is more suited for these kinds of questions