Am I the only one who simply doesn’t see the point of using TOML?
Even though it’s easy to find things in JSON and YAML that you could pick on, it is always pretty obvious what is being declared. It’s easy to see the hierarchy of it all: it’s one big tree of dicts, lists and scalars (disregarding some of YAML’s rarely used features, like tags and references). With TOML, that hierarchy simply becomes lost. It all feels like stuff is/can be declared in random order. 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.
Even if TOML has certain advantages over YAML/JSON, those advantages are so incredibly small if you look at the bigger picture. For JSON and YAML I can easily find parsers/generators for any language out there, even fairly exotic ones. For TOML there is a lot less choice.
> 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.
Yeah, YAML templating is just silly. I nowadays use Jsonnet (https://jsonnet.org) whenever I need to generate a configuration that needs some parameterization/computation in it. +1. Would advise to others.
Even though it’s easy to find things in JSON and YAML that you could pick on, it is always pretty obvious what is being declared. It’s easy to see the hierarchy of it all: it’s one big tree of dicts, lists and scalars (disregarding some of YAML’s rarely used features, like tags and references). With TOML, that hierarchy simply becomes lost. It all feels like stuff is/can be declared in random order. 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.
Even if TOML has certain advantages over YAML/JSON, those advantages are so incredibly small if you look at the bigger picture. For JSON and YAML I can easily find parsers/generators for any language out there, even fairly exotic ones. For TOML there is a lot less choice.