3 ms·
Well in my own language commas are entirely optional. They actually only exist for JSON compatibility (ie pasting JSON blobs into the language rather than trans
by hnlmorg 3y ago
Well in my own language commas are entirely optional. They actually only exist for JSON compatibility (ie pasting JSON blobs into the language rather than transcribing the data). But I will concede that having a comma separated list on a single line does at least improve readability for some people. In that particular scenario we are drifting into the laws of diminishing returns and thus things become a lot more subjective.
However having a comma terminator when followed by a LF doesn’t. The whitespace is larger and more visible than the comma. In that scenario the comma doesn’t add enough visual distinction to add value to the syntax.
- eviks 3y agoI don't mind some people thinking 1 is more readable than 2 1fruit = ["apples","oranges","bananas"] 2fruit = [apples oranges bananas] was only talking about commas being required like semicolons since multiple statements use space within, so need something else unlike lists, so it's not comparable