https://kotlinlang.org logo
#stdlib
Title
# stdlib
d

dimsuz

05/31/2023, 1:30 PM
Currently when I do
object Stuff
and call
toString()
on it, it includes hex. I recall there were some news about nicer toString for objects, but I can't find them now, maybe someone remembers?
d

dimsuz

05/31/2023, 1:31 PM
Right!
data object
, thanks!
I wonder if there's some nicer way to pretty-print objects in logs with the 1.7/1.8 version of Kotlin rather then manually overriding
toString()
. Maybe some plugin...
y

Youssef Shoaib [MOD]

05/31/2023, 3:34 PM
I think in 1.8 (might be 1.8.20) you can specify
languageLevel = "1.9"
or something like that and you'll be able to use
data objects
d

dimsuz

05/31/2023, 4:25 PM
oh, that would a be nice thing to try.