Toby
06/12/2021, 11:06 PMrnett
06/12/2021, 11:46 PMobject
is literally that 😄. You still have to initialize the properties, otherwise they wouldn't have anything, but it's a singleton. See https://kotlinlang.org/docs/object-declarations.html#object-declarations-overviewToby
06/12/2021, 11:46 PMToby
06/13/2021, 12:20 AMephemient
06/13/2021, 5:46 AMCLOVIS
06/13/2021, 7:48 AMRoukanken
06/13/2021, 10:32 AMToby
06/13/2021, 12:41 PMRoukanken
06/13/2021, 1:07 PMToby
06/13/2021, 1:32 PMNikky
06/13/2021, 2:24 PMlateinit var
could be used, the constructor (init
block can assign that)
but that will only work if it will be initialized at most onceNikky
06/13/2021, 2:25 PMlateinit var
and turn it into a object
initialization would then be done via method call instead of constructorToby
06/13/2021, 2:36 PM