Given these two options of defining a class I’m on...
# announcements
a
Given these two options of defining a class I’m only going to be using for event keys (in an analytics lib), which would you choose? 1)
Copy code
interface Foo {
        companion object {
            val NUM_FOOS = “number of foos"
            val FOO_NAME = “foo name"
        }
    }
2)
Copy code
object Foo {
        val NUM_FOOS = 6
        val FOO_NAME = “foo name"
    }
I prefer 2) obviously for succintness, but am worried that maybe having interfaces is better on memory usage because I have a hunch that interfaces are never instantiated, whereas objects are, albeit once. Is this a concern?