3 ms·
I have a nice counter example why "config files as source code" is a bad idea. The emscripten SDK (compile C/C++ to WASM) writes a config file as python source
by flohofwoe 7y ago
I have a nice counter example why "config files as source code" is a bad idea.
The emscripten SDK (compile C/C++ to WASM) writes a config file as python source file when it is installed. At first glance it looks like a fairly simple key/value config file, but it cannot be parsed by a 3rd-party-tool (for instance to extract the paths to the installed emscripten SDK) unless the file is evaluated with a full-blown python interpreter.
I don't understand how this can be considered a "good idea" under any circumstances ;)
- nitely 7y agoThe SDK could have a command line tool (or option) to dump the config in JSON format, if that config is meant to be consumed by other tools. I can come up with examples where config files are a bad idea all day long. Bottom line is neither is a silver bullet, and there are always trade-offs to be made.