Send As SMS

⊙ AntiQuark

Truth, Beauty, Charm, Strange

2005/05/11

C++ Miscellanea

Bjarne Stroustrup's C++ Style and Technique FAQ
How do you pronounce "cout"?
"cout" is pronounced "see-out".

How do you pronounce "char"?
"char" is usually pronounced "tchar", not "kar".
Yeah, I've know people who pronounced it "kar", which not only is annoying, it's illogical. I mean, if they're basing the pronunciation on the first syllable of "character", then you should pronounce it "care", not "car" (as in rhyming with "far"). Nobody pronounces "character" like "far-actor". Besides, look up "char" in the dictionary if you want to know how it's pronounced. By the way, Thank you Mr. Stroustrup, for giving some credence to my wild-eyed rants over the years.


Bjarne's belt buckle.

JTC1/SC22/WG21 - C++
The main repository of C++ standards committee. Some of those documents are password protected — those would be the records of the closed-door meetings where briefcases full of unmarked bills were passed around. Rumor has it that Bill "The Kid" Gates offered Bjarne "The Godfather" Stroustrup 80 million dollars if he'd rename C++ to "Microsoft C-triple-X". Stroustrup allegedly replied, "what do you take me for, a rube? Come talk when you got some REAL money, beeyatch!"

The Design of C++0x (PDF file)
Bjarne talks about future developement (the 0x indicates some future year before 2010) and current weaknesses in C++. He spends some time addressing the issues of making C++ easier for non-experts:
If you are a physicist needing to do a few calculations a week, an expert in some business processes involving software, or a student learning to program, you want to learn only as many language facilities as you need to get your job done. You don’t want to become a language expert—you want to be (or become) an expert in your own field and know just enough of some programming language to get your work done.
Local cache here.
(via borland.public.cppbuilder.non-technical.)

Evolution WG issues list
Lengthy disorganized technical summary of possible features and directions for C++.

New C++ Operator: "Goes To"
C++ has a new operator "-->". It's called "goes to". It works
for recent versions of the g++ compiler. (Gnu compilers have always had a history of implementing experimential features.)

Here's some sample code:

#include <stdio.h>
int main()
{
int x = 10;
while( x --> 0 ) // x goes to 0
{
printf("%d ", x);
}
}

(inspired by a post at perl.perl6.language.)


2 Comments:

  • At 11/03/2006 11:57 AM, Anonymous said…

    Pronunciation of 'char'. In the dictionary, it's pronounced liked 'charred', a combination of 'ch' like in cheese and 'ar' as in car. Rhymes with star. I find people who pronounce it like the begining of character (which I know it's the abbrev. of) sounds strange and ackward. Either way, isn't it more important that one simply understands what the other is talking about?

     
  • At 11/03/2006 1:54 PM, Derek said…

    But what if your code has a struct called "Care" or "Car"? Then people won't know if you're referring to the struct or the "char" type.

    If you pronounce everything phonetically, then you can sidestep that problem.

     

Post a Comment

<< Home