I've seen several programs where the configuration is just a TCL file or something. It has been a bad idea in every case I have seen thus far.
My favorite configuration file type?
# Comment
key = value
Trying to do more in the configuration file ends up causing more headaches than it solves. Commenting each option means you don't have to flip through the manual to figure out how to get the stupid thing to run.
There is some argument for the:
[section]
# Comment
key = value
Style syntax, but I find that for the vast majority of cases making those namespaces is an unnecessary complication. If you have multiple copies of the same option (like multiple VPN endpoints for example), it's almost always a better idea to just split each one up into its own file in a subdirectory instead of trying to stuff all of the info into a single configuration file. People who want to automate stuff later will thank you.
There are libraries to read and write those formats just as easily as JSON or XML or anything else. In fact they're usually easier to use because they don't have to worry about hierarchies or namespaces or any of that nonsense.
My favorite configuration file type?
Trying to do more in the configuration file ends up causing more headaches than it solves. Commenting each option means you don't have to flip through the manual to figure out how to get the stupid thing to run.There is some argument for the:
Style syntax, but I find that for the vast majority of cases making those namespaces is an unnecessary complication. If you have multiple copies of the same option (like multiple VPN endpoints for example), it's almost always a better idea to just split each one up into its own file in a subdirectory instead of trying to stuff all of the info into a single configuration file. People who want to automate stuff later will thank you.There are libraries to read and write those formats just as easily as JSON or XML or anything else. In fact they're usually easier to use because they don't have to worry about hierarchies or namespaces or any of that nonsense.
Some more thoughts on the subject: http://stackoverflow.com/questions/648246/at-what-point-does...