3 ms·
Trailing commas a very highly impactful to the users, and trivial to the language writers. The 123_456 syntax comes close to that, but is much less impactful.
by marcosdumay 3y ago
Trailing commas a very highly impactful to the users, and trivial to the language writers.
The 123_456 syntax comes close to that, but is much less impactful.
None of those will make the language hard to parse.
- Spivak 3y agoAs much as I think it's annoying I think no trailing commas enforces good coding hygiene and basically forces you to use a real encoder rather than as hoc string manipulations.
- rand_flip_bit 3y agoThis is such a bad take
- Spivak 3y agoCare to like, elaborate? Stopping people from doing brittle stuff like print("{") for elem in list: print('"key": "value",') print("}") seems like immediate worth.
- alwaysbeconsing 3y agoThat's not a very big hurdle to overcome, though: print("{") contents = "" for elem in list: contents += '"key": "value",' print(contents[:-1]) print("}")
- marcosdumay 3y agoYou are talking about data transfer encoding. Configuration languages are a completely different beast.