C pronunciation question

R

Richard

Army1987 said:
Since the ++ in ++x is one token, to be pedantic that's not a
one-to-one correspondence. How you distinguish it from `+ +x`?

Why would you want to? I've never seen that. x plus plus is as common as
air.
 
R

Richard Heathfield

Army1987 said:

Since the ++ in ++x is one token, to be pedantic that's not a
one-to-one correspondence. How you distinguish it from `+ +x`?

In the same way that you distinguish "notable" from "no table" - i.e. by
the appropriate use of brief but significant pauses.
 
C

Charlie Gordon

Richard Heathfield said:
Army1987 said:



In the same way that you distinguish "notable" from "no table" - i.e. by
the appropriate use of brief but significant pauses.

non sequitur. "notable" and "no table" are distinguishable essentially
because they are pronounced with different phonemes.
 
K

Keith Thompson

Army1987 said:
Since the ++ in ++x is one token, to be pedantic that's not a
one-to-one correspondence.

To be pedantic, yes it is (see below).
How you distinguish it from `+ +x`?
("By never using the latter" is an answer good enough...)

I don't need a one-to-one correspondence between C tokens and English
words. In this case, I'm satisfied with a one-to-one correspondence
between the C token ``++'' and the English phrase ``plus plus'' (which
wouldn't be a phrase in most contexts, but that's ok).

(In George Orwell's Newspeak, I suppose I could say ``doubleplus'';
I'd then feel obligated to declare a vaiable ``ungood''.)

If I wanted to refer to two consecutive ``+'' tokens, I'd probably
pause between the first and second ``plus'', or I'd find some other
way to disambiguate it.

Spoken English can't convey C source code with 100% accuracy unless
you speak *extremely* verbosely. In most contexts, such precision
isn't necessary. Consider a phone conversation where both of us are
looking at the same source code:

You see that line where it says "y equals x plus plus"? No, not
that one, the second occurrence in function "foo", just before the
"print-eff" call. Yeah, line 123. Try changing it from "y equals
x plus plus" to "y equals plus plus x".

I've said before that I prefer to pronounce ``='' and ``=='' as
``assign'' and ``is equal to'', respectively. I haven't followed that
here, because in this context there's no ambiguity; if there were, I'd
be more precise.

If I found myself saying:

No, it's not not "f o o b a r", it's "capital f, small o, small o,
underscore, capital b, small a, small r".

I'll probably just say "Forget it, just check your e-mail in five
minutes and call me back if it not clear enough".

C is fundamentally not a spoken language. When we say out loud things
like "plus plus" or "equals equals", we're not really speaking C,
we're speaking *about* C. Sometimes that's sufficient, but when we
actually need to speak C, writing it down is the only way to go.
 
J

Justin Spahr-Summers

If you pay attention, the '#' symbol can be made of two '+' (with a
subtle vertical and horizontal offset).

Right. Now what does that have to do with the fact that, in the name
of the language, there's a symbol whose pronunciation can't be decided
upon?
 
R

Richard Heathfield

Charlie Gordon said:
non sequitur. "notable" and "no table" are distinguishable essentially
because they are pronounced with different phonemes.

<sigh> Okay then - "berated" and "be rated". Sheesh, Charlie!
 
D

Darren J Longhorn

Charlie Gordon said:


<sigh> Okay then - "berated" and "be rated". Sheesh, Charlie!

<delurk>
This is probably one of those accent things, but they're not
pronounced the same way either, 'down our way'...
</delurk>
 
C

Charlie Gordon

Richard Heathfield said:
Charlie Gordon said:


<sigh> Okay then - "berated" and "be rated". Sheesh, Charlie!

Much better.
But how do you distinguish "be rated" from "B rated" ?
 
R

Richard

Charlie Gordon said:
Much better.
But how do you distinguish "be rated" from "B rated" ?

The way you pronounce it and pause.

one is "buhrated" and the other is Bee ... Rated.
 
P

Peter Pichler

Charlie said:
But how do you distinguish "be rated" from "B rated" ?

How do you distinguish between "there" and "their", "which" and "witch",
"its" and "it's", "whether" and "weather"...?

Good job we don't need to read C source out loud that often.
 
R

Richard Heathfield

Darren J Longhorn said:
<delurk>
This is probably one of those accent things, but they're not
pronounced the same way either, 'down our way'...
</delurk>

Welcome to Nonlurkland. :) Up our way, they /are/ pronounced the same
way, except for the small but significant pause in the second one (which
is why it's a good parallel). Down your way, substitute two expressions
which *would* be pronounced in the same way if not for the space.
 
R

Richard Heathfield

Charlie Gordon said:

But how do you distinguish "be rated" from "B rated" ?

Context.

Anyway, your new example is an analogy to a different C question. The
original question was how to distinguish ++n from + +n, for which
"berated" vs "be rated" was a reasonable analogy. But distinguishing "be
rated" from "B rated" is a problem that is closer to, say, "+ +n" vs "+
plusn".
 
C

Chris Hills

Peter Pichler said:
How do you distinguish between "there" and "their", "which" and
"witch", "its" and "it's", "whether" and "weather"...?

Good job we don't need to read C source out loud that often.

I once had a support call 2 minutes before the end of the working day
and he refused to email over the code example but started to read it out
over the phone and expected me to solve the problem. It contained some
nested structures to start with.....

That was fun!
 
P

Peter Pichler

Richard said:
The original question was how to distinguish ++n from + +n, for which
"berated" vs "be rated" was a reasonable analogy. But distinguishing "be
rated" from "B rated" is a problem that is closer to, say, "+ +n" vs "+
plusn".

That would be easy for me. I would pronounce the former "plus plusen"
and the latter "plus plusn".
 
O

Old Wolf

1. '\0'

2. '\n', '\a', '\b', '\f', etc.

My pronunciations: "backslash 0", "backslash n", etc.
3. NULL, nul (how to distinguish these two?)

"null", and i assume you mean "ascii nul"
4. char (3 possible ways I've heard are 4a) like the 1st syllable in
"character", 4b) like "char coal", and 4c) like "car"

"char" (as in charcoal)
5. Motif (like "motive" or more like the French word?)

mow teef
6. x = y, x == y (how to distinguish these two?)

"x equals y" for both, context sufficient to disambiguate.
(If unclear, "x single equals y" and "x double equals y")
7. ++x, x++, x += n

"plus plus x", "x plus plus", "x plus equals n"
8. argc, argv

"arg-see", "arg-vee"
 
R

Richard Bos

Marjancek said:
If you pay attention, the '#' symbol can be made of two '+' (with a
subtle vertical and horizontal offset).

True, but irrelevant, since (as I'm semi-reliably informed) Sheesh is a
cheap knock-off of Java, not of C++.

Richard
 
C

Charlie Gordon

Richard Bos said:
True, but irrelevant, since (as I'm semi-reliably informed) Sheesh is a
cheap knock-off of Java, not of C++.

If by cheap you mean "not expensive", you are right, both are free albeit
not open source.
If you mean "low quality", you have been misinformed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top