4 ms·
TOML seems to be catching steam. Would you say that’sa better alternative?
by pindab0ter 6y ago
TOML seems to be catching steam. Would you say that’sa better alternative?
- mercury_craze 6y agoI've not encountered this format before, it looks really interesting, certainly much more human friendly than JSON. Thanks for sharing.
- nanis 6y ago> TOML seems to be catching steam. I am convinced that TOML is the _only_ reasonable configuration format, but very few seem to be swayed. JSON and YAML are really not made for humans. Configuration must always be a hash. Configuration must allow for expository organization of the content to help humans understand what they are editing (comments, whitespace, section headings are very helpful). Parsing configuration should not result in unexpected code execution. TOML satisfies those criteria. I would love to see widespread adoption, but people still seem convinced that storing configuration in JSON is human friendly.
- jen20 6y agoMy personal favourites for humans are HCLv2 and its close cousin UCL (from FreeBSD). HCL suffers from only having a reasonable implementation in Go, however.
- samatman 6y agoYAML is clearly made for humans. It's just that it's badly made for humans, in that it tries to be too helpful, leading to the various footguns scattered around the format. TOML can be a bit verbose, especially if you have a case where your keys are more like sentences than they are like symbols. But there are no surprises, and it's quite pleasant to write by hand. I agree that it should be the first choice.
- nanis 6y ago> YAML is clearly made for humans. A format that allows references to other sections is not a configuration language that is usable by humans. I understand the people who created it thought it would be usable by humans, but clearly it is too complicated for anyone to be able to understand a YAML file that is bigger than a dozen or so lines.