Hacker News new | past | comments | ask | show | jobs | submit login

The YAML spec is huge, too large IMO for config files (you can use it while knowing only a subset, but you'll be lost as soon as someone uses a feature you don't know).

I think TOML strikes a good ballance between simplicity and features for config files. It ends up being easy to read and write.

https://github.com/toml-lang/toml




I wrote a layer around an existing parser that refuses to parse anything except that subset that most people use 99% of the time:

https://github.com/crdoconnor/strictyaml

IMO TOML is syntactically messy, especially when dealing with hierarchical data, and a whole new config format to deal with the fact that YAML has too many features is somewhat unnecessary.


I agree. You often want to parse and/or generate configuration files programmatically. For these cases it's good if parsing and interpretation of the file format can be easily implemented (or is already implemented in high quality). YAML has a quite big featureset and definitely doesn't fall into the "easy to parse" category. I'm also quite happy with using TOML for configuration files for these reasons.


Nod.

TOML is really nice for configuration files.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: