3 ms·
>This isn't generally the reason. The main reason config files exist is so you can run the program in in a different state easily My ide lets me f12 to my conf
by macromaniac 7y ago
>This isn't generally the reason. The main reason config files exist is so you can run the program in in a different state easily
My ide lets me f12 to my config.js file and i can use editor hotkeys like comment toggle so by this metric my method is superior.
>You still have to rebuild the app for those environments.
As i said above you dont have to rebuild for python and javascript since they can load the config file on the fly. I use xml or json for compiled languages because beign able to change the program without recompiling is of critical importance.
>you shouldn't have different code for prod and test and dev.
You dont have different file for test/dev/prod, you have 1 config file that has a few inline if statments based off of runtime args. For me 1 file is less confusing than 2 or 3.