aphex
03/30/2017, 2:08 PMinterface Foo {
companion object {
val NUM_FOOS = “number of foos"
val FOO_NAME = “foo name"
}
}
2) 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?