There are so many times the Oxford comma prevents ambiguity. I have yet to see a counterexample. Commas separate list entries, don't change it for the last one.
"I'd like to thank my mother, Ayn Rand, and God" is the usual example.
Yes, you can reorder the list to remove the ambiguity, but sometimes the order of the list matters. The serial comma should be used when necessary to remove ambiguity, and not used when it introduces ambiguity. Rewrite the sentence when necessary. Worth noting that this is the Oxford University Press's own style rule!
Only tangentially related (but hey, it's HN) - I'm so happy about the support/requirements for trailing commas in the modern language syntax:
x = [
123,
456,
789,
];
It makes editing such a list so much easier. Also, the commit diffs are cleaner (you don't need to add comma to the last element when appending a new one).
There are so many times the Oxford comma prevents ambiguity. I have yet to see a counterexample. Commas separate list entries, don't change it for the last one.
"I'd like to thank my mother, Ayn Rand, and God" is the usual example.
Yes, you can reorder the list to remove the ambiguity, but sometimes the order of the list matters. The serial comma should be used when necessary to remove ambiguity, and not used when it introduces ambiguity. Rewrite the sentence when necessary. Worth noting that this is the Oxford University Press's own style rule!
I always heard this one...
We invited the strippers, JFK, and Stalin to the party. [three groups invited - strippers, a president, and a premier]
We invited the strippers, JFK and Stalin to the party. [the president and premier are strippers]
Very different visual conjured by those two sentences.
I'd prefer:
We invited the strippers, JFK and Stalin, to the party [two strippers, named JFK and Stalin]
if the goal is to minimize ambiguity.
Only tangentially related (but hey, it's HN) - I'm so happy about the support/requirements for trailing commas in the modern language syntax:
It makes editing such a list so much easier. Also, the commit diffs are cleaner (you don't need to add comma to the last element when appending a new one).Spoilers: There is no "why not" in the article (aside from "tradition").
It is important to use the Oxford Comma because it is commonly accepted, fits with tradition, and is just correct.
obligatory oxford comma: https://www.youtube.com/watch?v=P_i1xk07o4g
You mean "Why, and Why Not"
You'd only use the Oxford comma when the list is 3 or more items.
Still funny.
[dead]