Hacker News new | ask | show | jobs
by geerlingguy 997 days ago
Honestly if the config layout fits in ini, there's no reason not to use it.

YAML is great for human-readable config, and there are footguns.

XML is terrible for human-readable config. JSON is not great for human-readable config. TOML is okay for human-readable config.

The problem is there's no clean way to abstract strings, bools, lists, objects, trees, etc. into a human-readable configuration syntax that does not have a footgun.

1 comments

> The problem is there's no clean way to abstract strings, bools, lists, objects, trees, etc. into a human-readable configuration syntax that does not have a footgun.

My favorite take on this by far is that any types beyond string, list, and dict don't belong in the format at all, and should be left to the ingesting code. I started on the path thanks to StrictYAML and found a home with NestedText.