I would prefer config to have private fields with constructors and getters for the following reasons:
consistency - access to some fields has to be done through getters because the value has to be converted
maintaining invariants - sometimes config params are interdependent,
future proofing - we can change the underlying type without affecting the API
setters we can but don't even have to have. I wouldn't mind if the config structs were completely immutable. If we do decide to have setters we can put validation logic into them. But I would prefer to not have setters at least atm
I would prefer config to have private fields with constructors and getters for the following reasons:
setters we can but don't even have to have. I wouldn't mind if the config structs were completely immutable. If we do decide to have setters we can put validation logic into them. But I would prefer to not have setters at least atm