Originally Posted by
Sarkastisk
The reason that is bad design is because it forces the next user of your source to know all of the constants used in your Map (sure, looping through the Map works) - being able to read it in the code gives new developers an idea of what is going on.
They're defined in config files so they aren't just random things thrown into a map, they have defaults for when the variable doesn't exist for example. Here's an example of such config, which the variable system is based on one from I believe transformers universe.
Code:
[variable_key]
type = "VARP"
domainType = "PLAYER"
dataType = "INT"
default = 0
clientKey = -1
persistent = false