Pronounciation of std::collections::VecDeque

Hi,
this might be a silly question, but after working with VecDeque for a while, i started wondering how to pronounce it.

  • "vec-dec"?
  • "vec-de-cue"?
  • "vec de queue" (french)?
  • "vec-dee-ee-cue"?

Regards,
mmmmib

The word Deque is generally pronounced like deck.

8 Likes

I thought it was "de queue" but I think it's actually "deck."

6 Likes

It's possible I'm incorrect in assuming Deque == Dequeue, but the dictionary says "dēˈkyo͞o".

dequeue | dēˈkyo͞o |

verb ( dequeues , dequeuing or dequeueing , dequeued ) [ with obj. ]

Computing remove (an item of data awaiting processing) from a queue of such items.

I've always pronounced it de-queue but I'm not going to claim I'm correct. It could well be I've been pronouncing it wrong all this time. Or maybe the pronunciation is locale dependent.

I have also heard it called "deck" so it's possible everybody else is just humouring me when I say it wrong.

Wikipedia says "(abbreviated to deque, pronounced deck)". It also points out that dequeue has the meaning "to remove from a queue", which is a distinct concept from being double-ended.

5 Likes

Also it says that it used to be more common for people to spell it "dequeue" in some APIs and textbooks, which is probably where I first learnt it. This spelling is deprecated for the reasons you mention.

I'll have to remind myself to pronounce it right.

Oh wow. Deque is a noun and Dequeue is a verb. But you can dequeue from a deque. That's not confusing at all. :-/

Learn something new every day.

7 Likes

Deque is sometimes written dequeue , but this use is generally deprecated in technical literature or technical writing because dequeue is also a verb

What kind of argument is that? As if languages, or English in this case, did not have nouns and verbs that were homophones!

Since a Deque stands for double-ended queue, I know I will always pronounce it as de-queue, and this way avoid having to remember this rather arbitrary exception.

5 Likes

I always assumed it was a homophone/old spelling of "deck" as in "deck of cards", as that is pretty much the model of what you can do with a Deque (cheaply insert or remove cards at the beginning and end of a deck, as opposed to a stack of cards where you can only add and remove from the top).

7 Likes

This is probably the best practical reason to pronounce it as "deck".

You say that as if English is consistent. If you're talking about a spec (specification), do you say "spess" or "speck"? Or there's the GIF creator's insistence on "jiff", though I prefer the hard-g pronunciation.

2 Likes

As if languages, or English in this case, did not have nouns and verbs that were homophones!

They do, but they don't usually overlap in context so egregiously.

As it is, you can dequeue from a deque, but a deque is not a dequeue action, so it is important to be able to distinguish the two in all of these contexts where they can be used together, and the simplest way to do that is by pronouncing them differently.

1 Like

I've come to the same conclusion, even though the "deck" pronounciation for dequeue bothers me highly.

That would be for deque :sweat_smile:

2 Likes

:sweat_smile: Thanks. You can see my confusion as a native-American-English proofreader. Double-ended queues were relatively novel when I first encountered them in the early 1960s, before Knuth analyzed them so well in TAOCP vol 1, where he called them deques. I seldom use them, as they're hard to implement safely, so I haven't needed to remember the terminology until encountering them so frequently on this Rust forum.

1 Like

Interestingly, I had a nearly opposite experience: My first introduction to the data structure called a queue was in my university course where they called the basic operations "enqueue" and "dequeue" (I think to differentiate them from a stack's "push" and "pop"). So I've always had it in my head that "dequeue" is an operation and std::deque is a container. This thread is the first time I'd ever heard of anyone spelling the data structure "dequeue" or pronouncing deque as de + queue.

Keeping "deque" (deck) and "dequeue" (de + queue) as separate words with very different pronunciations certainly seems like the least confusing option going forward. Although deques are kind of niche these days anyway so maybe it doesn't matter.

3 Likes

Given that "deck" rhymes with "vec", "vec deck" is what I usually say. (Not that I've ever really had a reason to use this collection type.)

Lack of consistency is an observation, not a dictum. You can move toward greater consistency or embrace inconsistency. I for one am just happy to see people give conscious attention to words.

1 Like

Hey, folks, since there is no consistency in English, just accept that, never assume anything and memorize the correct pronunciation of every word you see. If the Chinese can do it with their ideograms, we can too. There is no point of fighting the status quo by purposely using "logical" pronunciations, that native speakers don't expect. The problem can only be resolved by a centralized and complete reform of English writing system, which is extremely unlikely to ever happen. Until then, let's just agree that the current system is a great way of torturing foreigners (me included) for laughs and giggles, and move on. Or, alternatively, create a petition at change.org and move on :stuck_out_tongue_winking_eye:

3 Likes