Is there any benefit to having constants in a comp...
# announcements
c
Is there any benefit to having constants in a companion object instead of just using `private val`s in a singleton? Or even `public val`s for that matter
s
mostly just for
const val
and maybe other other things that you can annotate to mimic
static
for java interop
c
in 99 instances out of 100 we try to avoid
static
stuff in Java, so that is out of scope too. Okay, leaving "real" benefits/downsides aside. What does convention say about this? Is it a suggested practice to use companion object even if you do not care about java interop and static?