The Oxford Comma

I recently added support for the Oxford comma when emitting “verbose” style lists.

Without the Oxford comma, a list might look like this:

You see a book, a lamp and a spoon.

With Oxford comma (for those that do not know) - it would add a comma before the ‘and’ if there are 3 or more items in the list.

You see a book, a lamp, and a spoon.

I have to decide what the default will be. Let me know your opinions on how you feel about the Oxford comma.

2 Likes

The Oxford comma is definitely required. While it might not cause problems with your example, it does in this:

I had eggs, toast, and orange juice for breakfast.

versus

I had eggs, toast and orange juice for breakfast.

Did you have orange juice mixed with your toast? Or was it a plate containing eggs and toast and some juice in a glass?

There is another popular example that works better that involves John F Kennedy and Josef Stalin, but is not entirely safe for work.

Wait, you don’t do that?

I don’t agree, but maybe that’s because I’m French. (We don’t really have this concept of Oxford comma, as far as I know.)

By default, for me, all the elements of the list are separated. In your second example, with the context, it’s obvious the toast and juice aren’t mixed. (The “and” has the same meaning as a comma.) One would only need to add a comma in case of ambiguity.

But then, as I said, I’m French, so I guess my opinion doesn’t really matter. :slightly_smiling_face:

In any case, I wouldn’t say it’s absolutely required. As with many things, it depends. The question is more, “is the Oxford comma required more often than not?”

But as I understand it, the opinions on this question are very divided in the English world and can easily cause a flame war, so I guess there aren’t really definitive answers.

(And there goes my useless post! Thanks for reading!)

2 Likes

Casual googling suggests the world’s split roughly 50/50 on Oxford commas, and good specific examples are available to demonstrate both when it helps and when it slugs things up. e.g. The Best Shots Fired in the Oxford Comma Wars | Mental Floss

Sometimes it is absolutely essential for clarity of a particular sentence. ‘Con’ arguments tend to be about aesthetics and flow; sometimes it just makes a long sentence unnecessarily longer, adds a clause for no reason or reads worse in the mind of the reader. So for instance, personally, I don’t use Oxford commas by default, because I’m in the ‘They’re frequently aesthetically yucky’ camp, but when a comma is necessary to reduce or eliminate ambiguity – any kind of comma – then I put one in.

As the master of Adventuron, I reckon you can make the default whichever you prefer yourself. About half the people will be with you. The other half can just throw a switch – and that’s only if they notice. Some people won’t care, but in this thread, you may see a lot of caring from both sides. I just reckon they’ll broadly equal out :slight_smile:

-Wade

4 Likes

@severedhand makes a good point:

As a writer, I almost never use the Oxford comma, but as a reader, I don’t really care, it won’t trouble me if a text is littered with them.

when a comma is necessary to reduce or eliminate ambiguity – any kind of comma – then I put one in.

For me, this is the argument that makes it seem like using the serial comma by default in procedurally generated text is the right move: procedures for generating text are bad at making that judgment call, as a whole. The potential downside if you put it in is that some people will find the text stuffy; the potential downside if you don’t put it in is that someone will misunderstand, or at least have to mentally re-parse the sentence once they realize that the clause isn’t an appositive or an apostrophe. All in all, regardless of how individuals happen to feel about the serial comma in human-produced text, a system for producing procgen text should err on the side of not introducing new barriers to comprehension, especially if that can easily be turned off for a specific work.

Just my two cents.

4 Likes

Oxford Comma.

'Tis the stylish way.

I prefer the Oxford comma because it reads cleaner and requires less sentence parsing from the reader.

This is my brain reading David’s examples:

I had eggs, toast and orange juice for breakfast.

  • “I had eggs,”
    • found comma. start list:
    • item 1: eggs
  • “toast and orange juice for”
    • expecting comma, found ‘for’. end list:
    • splitting “toast and orange juice” by ‘and’:
    • item 2: toast
    • item 3: orange juice

I had eggs, toast, and orange juice for breakfast.

  • “I had eggs,”
    • found comma. start list:
    • item 1: eggs
  • “toast,”
    • found comma. continue list:
    • item 2: toast
  • “and orange juice”
    • found ‘and’ following comma. end list:
    • item 3: orange juice

I just think there’s less room for error. This is especially important since we’re talking about listing items in an adventure game that might possibly have “and” in their name (like a black and white photo, maybe).

4 Likes

I agree with @patrick_mooney that computers are ill equipped to know if a given case is ambiguous, and thus ought to err on the side of clarity. That’s why the Dialog library uses the Oxford comma when printing a list of objects. For consistency I’ve also used it in hand-written lists in my games.

Embarrassingly, due to sloppiness on my part, Dialog does not recognize the Oxford comma in player input. Either “and” or “,” can be used to separate object names, but not both. This has been on my to-do list for ages.

4 Likes

I think you may want to add a poll to your post. When you’re in edit mode select settings (the gear icon) and then choose build poll.

I’m definitely strongly in the Oxford comma club. It is clearer and more consistent.

I don’t feel strongly but like to throw my 2 cents anyway. :slight_smile:

If you just said “I had toast and orange juice”, there would be zero people complaining about ambiguity that maybe you meant that you mixed together your toast and orange juice. Nobody thinks you should add a comma here: “I had toast, and orange juice”. So why when you add one more item does it suddenly matter? The commas are not about ambiguity, but about separation of items. Both the comma and the “and” service that purpose.

If you think about how this phrase would work with spoken word, you wouldn’t have the advantage of the commas, so if you really wanted to say you had eggs and toast mixed with your orange juice, you would probably say just that.

So it’s really about esthetics, nothing else. So that’s why it’ll be 50/50. My vote is for no oxford comma, but honestly don’t care much, especially if there’s a way to override it.

1 Like

Some of these were good!

There is certainly room for confusion both with and without, but there will logically be (slightly) more cases of ambiguity without the Oxford comma, at least if you know whether the author uses it.

In spoken word you would use pauses. You wouldn’t say “I had eggs [pause] toast and orange juice for breakfast.” People would wonder why you paused and then rushed the rest. You would pause after “toast”, even just a small one, to let the listener know you didn’t mean “toast and orange juice” as one item. This is what the comma is for.

And I know readers aren’t dumb. Obviously they can figure out that they didn’t mean “toast and orange juice” as one item because “I had item 1, item 2 for breakfast” is not grammatically correct. My personal issue with it is that it requires backtracking. Once you realize it’s not grammatically correct, you have to go back and separate the items.

Also you can’t always depend on “and” to signify the last item in the list.

The clothing on the rack came in various styles including thin and revealing, loose and comfortable, and thick and durable.

4 Likes

True.

Now, what if I had orange and green tea?

To determine algorithmically if a phrase is ambiguous, it seems we would need strong AI and a huge language database.

1 Like

That doesn’t parse correctly either way. You’d have to have “an orange and green tea”, which would parse as two items, since a single tea cannot be both colours simultaneously. (Though you might have had “an orangish green tea”.)

Also, the Oxford Comma usually doesn’t apply with lists of only two items, so this was off-topic anyway. :slight_smile:

To go back to the original question, I would prefer there to be no “oxford comma”. It was never taught at school and the few times I have encountered it while reading, I assumed it was an error that escaped the proof readers. To me it detracts from reading smoothly; a bit like hitting a speed bump when driving. Not that I will be using Adventuron any time soon as I don’t plan to learn another language now that I’ve retired. It is enough to keep abreast of the ones I already use.
As someone else said above, it’s your program and you should do whatever feels right to you and those that wish to use it will either learn to love it or look to some way to override it.

1 Like

Oh right, since I forgot to explicitly address that: I believe that works that do not use the Oxford Comma are grammatically incorrect. However, I make allowances for those who don’t know any better, so it doesn’t bother me too unduly. :grinning:

4 Likes

Using Oxford comments in a classic text adventure would be a little over the top. :slight_smile: Not that people don’t enjoy over the top solutions to something that should be simple.

1 Like

“Orange”, at least colloquially, is short for orange juice. So “We drank orange and green tea” might be better with a comma, though that’s an argument for a comma rather than specifically for an Oxford comma. If it were in a longer list then the context might make the comma unnecessary: “We drank milk, orange and green tea.”

I avoid the Oxford comma unless it helps avoid ambiguity or just makes the sentence read better, e.g. in the example above where a list item already has an “and”. I wonder whether Inform ever adds a comma (based on a rule like this) even when they are turned off.