3 ms·
> It's very verbose. It's not DRY. It's syntactically noisy. I don't completely disagree with this. However, in most cases TOML is used, it isn't that much of
by thayne 3y ago
> It's very verbose. It's not DRY. It's syntactically noisy.
I don't completely disagree with this. However, in most cases TOML is used, it isn't that much of a problem.
And I actually like that the full key is repeated. When you have several layers of nested mappings, it can be hard to determine exactly where the current value is in the hierarchy. Especially if the top level key is above the current screen of text. It can also make it easier to search for a specific key. IMO, this is a case where more verbosity and repetition makes it more readable.
That said, it seems a little arbitrary to me that inline tables don't allow newlines within them. If they did, then if you didn't like repeating the keys, you could use inline tables.
> TOML's hierarchies are difficult to infer from syntax alone
This is a little subjective, and depends on the actual data represented in the config.
But in general, my experience is that when you have several layers of nesting, and the only indication of the hierarchy is indentation, it can be a little hard to follow where a specific value fits in the hierarchy. See above.
And I disagree that meaningful indentation is "generally considered a good idea". I won't enumerate the pros and cons here, as it has been discussed a lot elsewhere, but it is definitely controversial, and subjective.
> Overcomplication: Like YAML, TOML has too many features
This section lists exactly one feature that it thinks TOML shouldn't have. Maybe dates shouldn't have been included, but it isn't anywhere close to the complexity of YAML.