DOCS: Use actual TOML rather than a strawman #199
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your "What is wrong with TOML?" page has been coming up in a number of links for me recently, so the fact that the TOML example you use to illustrate why it's bad is so far removed from what any human would write is all the more egregious. I certainly don't mean to argue that TOML is perfect, but it's by no means nearly so bad as people would come away from that file thinking. So, I've edited the mechanical output from whatever tool you used to more accurately reflect what it would actually look like in practice.
As I say in the extended commit message, this still isn't the ideal showing for TOML given some decisions in the story schema, but I've also avoided using some tricks like inline tables which would have improved the comparison at the expense of readability. The key-as-human-readable-name is particularly impactful; by (properly) moving that to a machine-readable-but-human-friendly field under a machine-readable-but-human-friendly top-level key, the TOML drops another 0.5KB and becomes comparable in size to the YAML. Similarly, if I had left all the strings as the original single-line-with-
\n
, the file only came out to 74 lines total, but even with human-readable paragraphs and properly-broken error messages, it's still roughly equal LOC to the original TOML -- which shows how bloated the example was.(Disclaimer: I personally disagree on every disadvantage you list except the syntax hierarchies -- and there I disagree even more strongly that Python is the example to follow. But I wouldn't hold anyone else to my views, and I recognize that what works for me really doesn't work for many others.)