<Storing map in code vs in a file> In situations w...
# forum
r
Storing map in code vs in a file In situations where we have to add a large immutable string to string map with all entries known during compile time, into our program: What is the better option? store the map entries in code, e.g.: fun loadMap(): Map = mutableMapOf().also { it["K1"] = "V1" it["K2"] = "V2" it["K3"] = "V3" /* ... */ } store the map in a resource file; load file and de-serialize it into a map when needed It appears to me that option (1) is far superior with no...