DOCS: Use actual TOML rather than a strawman#199
Open
ag-eitilt wants to merge 1 commit intocrdoconnor:masterfrom
Open
DOCS: Use actual TOML rather than a strawman#199ag-eitilt wants to merge 1 commit intocrdoconnor:masterfrom
ag-eitilt wants to merge 1 commit intocrdoconnor:masterfrom
Conversation
The example file looks to have been machine-generated and (being generous) written to an old version of the standard, and does not present an accurate counter-example to the YAML. This updates it to be (closer to) TOML as it might actually be written. *Actual* actual TOML would very likely not include story/test names as the keys and instead simply something like `[map.variations.one-key]", with the full `"Mappings with defined keys (Map)"`, etc., names being defined as data-pairs within that, but I consider that a wart of the schema rather than of the language used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.)