62

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.

  • 7
    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". – Kevin Workman Feb 11 '15 at 14:19
  • 24
    @KevinWorkman Well, that last one is easy-peasy: var rhymes with char, of course! ;-) – Janus Bahs Jacquet Feb 11 '15 at 18:06
  • the defined pronunciation is "deck". But since it is so rarely used, it doesn't come up often. – Oldcat Feb 11 '15 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 '15 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 '15 at 16:19
  • @JohnY - I know the concept has been around for a long time. Which is why I know that "dequeue" is sometimes shortened to "deque", eg. I've implemented queues of various types many times. I've just never heard the pronunciation "deck". – Hot Licks Feb 17 '15 at 16:36
  • A deque is different than a queue in that you can add and subtract from either end at any time. In C++'s STL is also assured to not allocate memory for every element like a linked list, but do so in chunks like a vector for efficiency. – Oldcat Feb 17 '15 at 20:00
  • @KevinWorkman Were you implying that 'earl' is incorrect for URL, or are you giving it as an example of things that different people say differently? There are definitely people that use that pronunciation--I have no doubt that some prefer it for its quirkiness.

    gif [hard or soft g], png ["ping" or P-N-G], SQL ["sequel" or S-Q-L] are other examples.

    The only caveat I would add is that occasionally you run into a pronunciation that marks you as a newbie. In the case of SQL, that can apparently go either way (see http://english.stackexchange.com/questions/7231/how-is-sql-pronounced?rq=1).

    – msouth Feb 18 '15 at 12:23
  • @msouth PNG is easy: the developers of the format explicitly specified the pronunciation to be "ping". Unfortunately, this is an exception; the creators of most other new words in the computer world just leave you hanging. – Mr Lister Feb 19 '15 at 10:36

4 Answers4

60

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.

30

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."

Kaz Dragon
  • 1,361
  • 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 '15 at 15:20
  • That would be unqueue, no? – J. C. Salomon Feb 19 '15 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 '15 at 14:57
  • @undefined Wow, now I wish the data structure was simply called "deck". That analogy is perfect. – iono Mar 03 '21 at 14:07
10

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.