3 ms·
I wonder if programmers use the Oxford comma more than the general population. It just feels more consistent to me to have all items delineated with commas (or
by sudobash1 5y ago
I wonder if programmers use the Oxford comma more than the general population. It just feels more consistent to me to have all items delineated with commas (or semicolon if items contain commas: http://sana.aalto.fi/awe/punctuation/semicolons/02.html http://sana.aalto.fi/awe/punctuation/semicolons/02.html).
- deleted 5y ago[deleted]
- tomjakubowski 5y agoIt's not consistent, though. Nobody uses the Oxford comma in a list of two. In the Oxford regime, "apples and oranges", when prefixed with another fruit, becomes "bananas, apples, and oranges". If you wanted to implement an "insert commas" algorithm recursively, choosing Oxford requires passing an extra bit along to signal to the terminal case (joining the last two list elements) that there are > 2 elements total. Inelegant to my mind.
- Sohcahtoa82 5y agoIf I say out lout "bananas, apples, and oranges", then I have a slight pause between each item in the list and the comma represents that pause. I say "bananas (pause) apples (pause) and oranges". I do not say "bananas (pause) apples and oranges".
- datavirtue 5y agoIt definitely appeals the my sense of logic and clarity.
- Smithalicious 5y agoI don't like the Oxford comma, because I see a, b, c <-> a and b and c, i.e. the comma is a stand-in for the word "and". Thus "a, b, and c" has a double separator between b and c.