3 ms·
As 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 strin
by Spivak 3y ago
As 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.