5 ms·
No trailing commas is actually INconsistent, consistency is when every element ends with a comma You've also got it backwards on quotes, it complicates writing
by eviks 1y ago
No trailing commas is actually INconsistent, consistency is when every element ends with a comma
You've also got it backwards on quotes, it complicates writing by forcing you to write more. And with "Especially when automation exists" wondering is a non-issue, you'd get the syntax hint/error right there while typing and see if you need quotes before anything breaks
- godshatter 1y agoThe problem I have with trailing commas for the last entry is that it's missing one key bit of information: the last entry is supposed to be the last entry in the list. Whenever I see a list where the last entry has a trailing comma I wonder if someone copy-pasted only part of the list or something. Having to add a comma when appending to the list doesn't seem that bad to me as a trade off.
- eviks 1y agoThe last entry already has an indicator - like a closing bracket. > Having to add a comma when appending to the list doesn't seem that bad to me as a trade off. Then do that! No one is forcing you to add trailing commas, they're optional and for all the other people who don't think they add value