Now, in c++ ‘…’ became a first class operator.
In speech, how do you pronounce it?
So far I’ve heard:
- dot dot dot
- triple dot
- ellipsis
related: Is it OK to replace … with ellipsis in writing?
e.g. “The ellipsis operator expands the pack”
EDIT (clarification): We are all aware that ‘…’ as a punctuation mark is indeed called ellipsis. But in the context of C++ we don’t pronounce the names of the punctuation mark. For example, the ‘&’ operator, depends on the context is pronounced as ‘and’, ‘bitwise and’, ‘address of’, ‘logical and’ (when && is used), or ‘reference’. It is rarely pronounced as ‘ampersand’.
In speeches, I’ve a feeling that ‘dot dot dot’ is used more often. For example: http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Variadic-Templates-are-Funadic (an excellent presentation about variadic templates).
On the other hand, ‘dot dot dot’ is awkward hard to pronouce (‘d’ and ‘t’ are both pronounce with the tongue).
Can we pronounce it ‘unpack’?
7
in the context of C++ we don’t pronounce the names of the punctuation mark
I disagree with your premise. In my experience people refer to the meaning of the symbol when that’s what they’re talking about, but use the name when they need to refer to the symbol itself:
I see your problem: you’re using bitwise AND instead of logical AND — you need to use two ampersands for logical AND.
The trouble with ...
in C and C++ is that it’s not an ellipsis character. I’m sure it’s meant to represent an ellipsis, and its meaning is similar to what an ellipsis represents in English, but I’d guess that most compilers would choke on a real ellipsis (…
). That surely wasn’t an issue in the old days, when ASCII and EBCDIC were all there was and ellipses could only be simulated with ...
. These days, though, you might cause some confusion if you said:
I see your problem: that function should take variadic arguments — add an ellipsis to the declaration.
To be really precise in such a situation, you should say “dot dot dot.” If you’re just talking about existing code, though, it’d be fine to say elipsis:
You can see from the ellipsis that foo(int bar, ...)
takes a variable number of arguments.
Can we pronounce it ‘unpack’?
Only if you don’t care about being understood, or if you plan to preface your comments with “I’m going to pronounce ‘dot-dot-dot’ as ‘unpack.'”
You’re right; it’s called an ellipsis. You can hear both the AmE and BrE pronunciation on the OALD page for “ellipsis”.
Edit: I would say something like “the ellipsis represents variadic arguments.”
0
It is an ellipsis, but I’d read or pronounce it as “dot dot dot”.
It’s a punctuation mark, and I think of it the same as & (ampersand) which I read/pronounce as ‘and’.
7
I call it the variadic operator. If that’s been misinterpreted or not understood, people have been far too polite about it.
I pronounce it with a long e.
E-lip-seez
Merriam-Webster doesn’t pronounce the e as a long E. It’s more like an i.
i-ˈlip-səs, e-
Also, I don’t think you could go wrong either way when writing your statement “The ellipsis operator expands the pack”. Since the ‘…’ is technically called an ellipsis, “The ellipsis operator expands the pack” is fine, but since ‘…’ is also the representation of the operator, “The ‘…’ operator expands the pack” would also be completely fine, in my opinion.