In Swift, I like to use structs to store a bunch of constants like a certain integer or color I would like to use throughout the app. Some of these have to be determined at runtime. What would be the Kotlin equivalent of this?
Do I have to create a data class with a dummy parameter with a default value, and store the constants in that class?
Do I have to create a normal class with a companion object and store constants in there? If so, how does that affect performance? Does it still instantiate the class if I use it many times?
What if I create a class with no companion object, but several other objects stored in it instead, each with their own set of constants. How does this affect performance?
Do I create an object and store constants in there? Is it automatically a singleton object?
Or is there a better way to go about this?