5 ms·
They are visually annoying and I'll trade that for minor visual annoyance while looking at diffs any day. I look at code far more often than I look at diffs. O
by keymone 9y ago
They are visually annoying and I'll trade that for minor visual annoyance while looking at diffs any day. I look at code far more often than I look at diffs.
On a related note I'd rather not have any commas like in EDN. All problems go away.
- coldtea 9y ago>They are visually annoying That's a personal opinion -- like a mild OCD annoyance, etc, most like borne just out of being used to not having them from the start. Their benefits on the other hand (uniform syntax, easier insertions/deletions, better for source code control, etc) are objective. And there's no objective visual annoyance when looking at the code to see that it's uniformly comma-ed.
- keymone 9y ago> personal opinion I take it you didn't read my original comment? Also I disagree, dangling comma is a visual cue that the sequence has a continuation.
- coldtea 9y ago>Also I disagree, dangling comma is a visual cue that the sequence has a continuation We already have a mechanism for telling whether a sequence ends or not -- the opening and closing bracket for the sequence. No need to have a second redundant one. This way the last element is an ordinary part of the sequence as any other and doesn't need a special exception to its formatting like the omission of the comma. Besides the point is moot as the "dangling" comma is already part of the JS standard.
- keymone 9y agoYou're talking about syntactic rules, I'm talking about visual cues. IMO there is no reason to have commas at all so this discussion is pointless.
- coldtea 9y ago>You're talking about syntactic rules, I'm talking about visual cues. In what way is ] also not a visual cue?
- keymone 9y agoIn what world having multiple cues with opposite meanings is considered good?
- coldtea 9y agoIn what world is the "," at the end of the final line an "opposite meaning" to ]? Not on modern JS world, which allows for dangling , everywhere: http://2ality.com/2013/07/trailing-commas.html http://2ality.com/2013/07/trailing-commas.html, so having a "," doesn't mean the line is not the last one anymore, just means "it's a line like any other". It's time JSON gets up with the times -- especially since it's a totally backwards compatible improvement.
- keymone 9y ago> it's a line like any other yeah, in other words - there should be no commas whatsoever. Weren't you the one complaining about redundancy?