First: This is a really big debate issue, not a quick Q+A.
My favourite right now is to simply include Lua, because
- I can permit things like width=height*(1+1/3)
- I can make custom functions available
- I can forbid anything else. (impossible in, for instance, Python (including pickles.))
- I'll probably want a scripting language somewhere else in the project anyway.
Another option, if there's a lot of data is to use sqlite3, because they're right to claim
Choose any three.
To which I would like to add:
- backups are a snap. (just copy the db file.)
- easier to switch to another db, ODBC, whatever. (than it is from fugly-file)
But again, this is a bigger issue. A "big" answer to this probably involves some kind of feature matrix or list of situations like:
Amount of data, or short runtime
- For large amounts of data, you might want efficient storage, like a db.
- For short runs (often), you might want something that you don't need to do a lot of parsing for, consider something that can be mmap:ed in directly.
What does the configuration relate to?
- Host:
- I like YAML in /etc. Is that reimplemented in windows?
- User:
- Do you permit users to edit config with text editor?
- Should it be centrally manageable? Registry / gconf / remote db?
- May the user have several different profiles?
- Project:
- File(s) in project directory? (Version control usually follows this model...)
Complexity
- Are there only a few flat values? Consider YAML.
- Is the data nested, or dependent in some way? (This is where it gets interesting.)
- Might it be a desirable feature to permit some form of scripting?
- Templates can be viewed as a kind of configuration files..