3 ms·
You’d think, as an industry, we’d have learned that parsing an introspecting config files shouldn’t have side effects.
by numbsafari 4y ago
You’d think, as an industry, we’d have learned that parsing an introspecting config files shouldn’t have side effects.
- HelloNurse 4y agoIt's the eternal opposition between taking shortcuts and doing things the easy, cool and dangerous way vs. planning and optimizing and doing things the boring, slow and cautious way. In the specific case of configuration files, the danger is easy to underestimate because configurations are often considered a minor, easy,low value part of an application.
- klodolph 4y agoI think you may be overestimating how universal the lessons are. For more complicated configs, a common approach I see is that the “config file” is a program that generates the actual configuration data. If you just need to parse and introspect the config data, you fetch the build output and parse that, which does not have side effects.