-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lists in the style of TOML #613
Comments
Wat? |
Lists shouldn't use table syntax, that would be too confusing. I think a case could be made for making the comma between list items optional if they were separated by a newline instead. This would allow writing:
|
Yes, I also think commas are unnecessary. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@pradyunsg Please mark the second reply as off-topic too. (#613 (comment)) And commas in the list are necessary IMHO. |
Nice catch @drunkwcodes! I don't think the syntax proposed by OP is good since it's easy to confuse it with tables. The newlines as delimiters discussion is an interesting one but it's a post 1.0 discussion, since it's scope can be bigger than just lists (see #551). Since I'm trying to keep focus on getting 1.0 ready soon (#617), I'm going to go ahead and close this issue. Thanks @wycats for filing this issue and everyone who contributed to this discussion! |
For now, TOML lists are JSON-like :
Wouldn't it be more TOML-ish to allow to define lists this way :
With this simple rule : if an element has no key, just a value (or just a key and no value, depending on the point of view), it's a list element and its parent is a list.
I'm actually the author of a TOML's Javascript parser, with which I allowed this syntax because it felt so comfortable (I had many URL lists in my configuration file).
The text was updated successfully, but these errors were encountered: