58

deque is a standard container in the C++ programming language. Its name stands for Double Ended QUEue. I am wondering how this word should be pronounced:

  • like deck (this is how I've pronounced it so far)
  • like dequeue
  • like Dee-Ee-queue

I realize that this word is not in the dictionaries. I just want to know how most programmers pronounce it. Hope it's on topic.

9
  • 6
    I've always heard "deck". But I wouldn't worry too much about it- you'll find that different programmers pronounce things differently, just because you can go a long time without saying programming words out loud. Until recently, I said "earl" instead of "URL". Yesterday I had a conversation about whether "var" rhymed with "chair" or "car". Feb 11, 2015 at 14:19
  • 24
    @KevinWorkman Well, that last one is easy-peasy: var rhymes with char, of course! ;-) Feb 11, 2015 at 18:06
  • the defined pronunciation is "deck". But since it is so rarely used, it doesn't come up often.
    – Oldcat
    Feb 11, 2015 at 19:40
  • 2
    I guess I've never heard "deck". But then I haven't played with C++ much. I would tend to pronounce it D-Q, since "dequeue" is often shortened to "deque" in other programming environments.
    – Hot Licks
    Feb 14, 2015 at 13:11
  • @HotLicks (and Armen): It's not specific to C++. The concept has been around for a long time, definitely predating C++; and computer science students of a certain age will likely have had to implement one themselves from lower-level building blocks.
    – John Y
    Feb 17, 2015 at 16:19

4 Answers 4

56

From The Art of Computer Programming, volume 1, section 2.2.1 "Stacks, Queues, and Deques":

A deque ("double-ended queue") is a linear list for which all insertions and deletions (and usually all accesses) are made at the ends of the list. A deque is therefore more general than a stack or a queue; it has some properties in common with a deck of cards, and it is pronounced the same way.

It's pronounced /dɛk/, just like the word deck, as in a deck of cards.

2
  • 7
    Knuth is always right in the end. If he wasn't, he would be broke. To say he wrote the book on all there is to know about computer programming would be the understatement of all time. Feb 23, 2015 at 18:13
  • I search on how to pronounce 'Dequer' whereas it is a last name of someone. I assume it is pronounced as 'deck-er', correct? Nov 15, 2020 at 20:14
29

It is most commonly pronounced the same as "deck," usually to distinguish it from a "de-queue" operation. And so, you can "de-queue an object from the deque."

4
  • 9
    It also functions the same way as a deck of cards - it is easy to take one card off either end of the deck, but harder to extract an individual card from the center of the deck. That similarity suggests that "deck" was the intended pronunciation.
    – undefined
    Feb 14, 2015 at 15:20
  • That would be unqueue, no? Feb 19, 2015 at 21:33
  • 3
    @J.C.Salomon I don't think so, because the verb to put something on the queue is to "enqueue" it, and that would sound almost exactly the same.
    – Kaz Dragon
    Feb 21, 2015 at 14:57
  • @undefined Wow, now I wish the data structure was simply called "deck". That analogy is perfect.
    – iono
    Mar 3, 2021 at 14:07
9

I realize your question specifically mentions C++, but in Java there is a standard interface java.lang.Deque. The official Javadoc for Deque reads (in part):

The name deque is short for "double ended queue" and is usually pronounced "deck".

The wikipedia for Double-ended queue says

dequeue, often abbreviated to deque, pronounced deck

and

Deque is sometimes written dequeue, but this use is generally deprecated in technical literature or technical writing because dequeue is also a verb meaning "to remove from a queue".

-6

It is pronounced "deek," like the hockey maneouvre.

1
  • 9
    Would you care to provide some citations?
    – 568ml
    Feb 19, 2015 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.