4 ms·
> Why would anyone want to back to using INI files? I remember using them on DOS and Windows and I can’t remember liking them that much. If all you need to do
by krapp 7y ago
> Why would anyone want to back to using INI files? I remember using them on DOS and Windows and I can’t remember liking them that much.
If all you need to do is set some constants and maybe an array, then INI is perfectly fine. Using YAML where you don't need its complexity is overkill, and that complexity would encourage feature creep in order to justify using that format.
I'd agree that a lack of available parsers for TOML might be an issue, except the implementations page of the wiki seems to list implementations for most languages people are likely to use[0].
Also, I don't know what you mean about the hierarchy being "lost" in TOML - obviously things aren't being declared in random order, it seems straightforward to me what's going on when I look at it. I really can't say the same about a lot of YAML code I've seen.
Use what you like but it seems like your issues here amount to aesthetics and personal taste. Personally, I think YAML is too clever for its own good. Just read the recent HN thread about YAML templating - when your config format is so complex you need an entire separate workflow (likely with its own configuration setup) to generate it, and at the end of the day you still can't abbreviate Norway properly[2], maybe it's not the best option for every case. Or even most cases.
[0]https://github.com/toml-lang/toml https://github.com/toml-lang/toml
[1]https://news.ycombinator.com/item?id=19108787 https://news.ycombinator.com/item?id=19108787
[2]https://news.ycombinator.com/item?id=17359376 https://news.ycombinator.com/item?id=17359376
- EdSchouten 7y agoYeah, YAML templating is just silly. I nowadays use Jsonnet (https://jsonnet.org https://jsonnet.org) whenever I need to generate a configuration that needs some parameterization/computation in it. +1. Would advise to others.