3 ms·
Actually, in the JSON grammar as many others, the comma is completely irrelevant for the purposes of disambiguation. Commas could essentially be treated as whit
by setzer22 9y ago
Actually, in the JSON grammar as many others, the comma is completely irrelevant for the purposes of disambiguation. Commas could essentially be treated as whitespace and nothing would substantially change.
Now, I don't know whether commas allow for faster parsers in some way, but edn[1] seems to be doing just fine without them.
Once you get used to optional commas, it really becomes a nuisance having to type them, especially in basic data type lists. The only place where I find commas visually helpful is C-style argument lists (with type and value pairs), which JSON doesn't even use.
[1] https://github.com/edn-format/edn https://github.com/edn-format/edn
- masklinn 9y ago> Actually, in the JSON grammar as many others, the comma is completely irrelevant for the purposes of disambiguation. Commas could essentially be treated as whitespace and nothing would substantially change. A while ago I saw somebody who had implemented pretty much that: a streaming non-validating JSON parser which just ignored commas and colons entirely.