46

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.

  • 5
    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
  • 20
    @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
45

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.

  • 3
    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. – Canis Lupus Feb 23 '15 at 18:13
28

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

  • 8
    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
  • 2
    @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
7

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

-5

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

  • 7
    Would you care to provide some citations? – 568ml Feb 19 '15 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.