July 01, 2004
Divided by a Common LanguageVerity Stob
"I have come to view C++ as a federation of several different languages: C, OO C++, STL, [and] TMP," wrote Scott Meyers on the comp.lang.c++.moderated newsgroup. Quite so, and the species of programmer that live in the federation are quite varied, too, claims Verity Stob.
Divided by a Common LanguageDr. Dobb's Journal July, 2004 "I have come to view C++ as a federation of several different languages: C, OO C++, STL, [and] TMP," wrote Scott Meyers on the comp.lang.c++.moderated newsgroup. Quite so, and the species of programmer that live in the federation are quite varied, too, claims Verity Stob.
Verity is the pseudonym of a programmer based in the UK. She can be contacted at VerityStobddj.com.
Species: Old Men of the CStamping ground: Embedded system shops, Linux generally, and the GNOME desktop project in particular.
Spore:
#include "header.h"
Regrets: The removal of static as a keyword applied to functions.
Most enviable vice: Guilt-free (type)casting.
Mating call: You do as you like, but I don't trust the compiler doing stuff behind my back.
What to do if one becomes trapped in the house: Bless their little cotton socks! (Cotton socks worn, of course, with sandals.) This is a harmless and usually amiable species, once very widespread, but now sadly somewhat declined. Treat it gently, and see if you can get it to take a saucer of warm gin. Species: Microsoft Soviet Era
Stamping ground: Wherever you may find five-year-old Windows projects.
Spore:
BOOL CVeryBigClass::GetResult()
Mating call: MFC always was underrated. It's very, very powerful, once you understand it properly.
Guilty secret: Hopes that Microsoft will give up on 'all this .NET malarkey. I mean, it may be all right for you people, but in our line of business we really need that front-end performance. C#, pah!'
Really daring thing it does for a lark: Edit the AFX_MSG_MAP block generated by the ClassWizard, in open defiance of the official comment prohibiting this.
What to do if one becomes trapped in the house: They can be driven off effectively and humanely using the Stobbo patent SoftieScarer, which gives off the musty odour of MCSD Exam 70-016 (discontinued). A snip at $200. Species: Confused Putative STL User
Stamping ground: Small independent programming shops, where C++ is not the main language.
Spore:
// Yes! Yes! Yes!
Guilty secret: Continues to use the Singleton pattern, despite its fall from grace in more fashionable circles.
Mating call: Did I tell you about my milkshake trait? It brings all the boys to the yard.
Unconvincing attempt to mix it with hard-core C++ techies: What, are there really punters who don't care a fig about the Standard? And are quite content if something just works with their compiler? Well. I'm very shocked, I can tell you. Shocked.
Another way to catch it out: Yes of course I use the Boost Graph Library. I love its 3D pie charts.
Reason for notable familiarity with this species? You wouldn't perhaps belong... Mind your own business. Species: The League of TMPers
Stamping ground: The specialist newsgroups.
Spore:
// factorial
Progenitor: In 1994, Erwin Unruh turned up at a C++ standardisation meeting with a program that didn't compile, but which output a sequence of prime numbers in its compilation error messages.
Evolution: Ten years later, many TMP programs now compile. There again, not that many.
Notable characteristic of Template Meta-Programming programs: Computation is done at compile time not runtime.
Mating call: My compile time is longer than yours.
Where do they come from, these meta-programmers? Those kids, the ones who were given 'My Little C++ Compiler' for their seventh birthday, have grown up.
Wait a moment. Your 8 factorial evaluates to 0 instead of 40320. You want a '1' in the template specialisation. Oh, leave me alone, clever clogs.
You're sore because these TMPers are smarter than you. I admit it. I am envious, to envy level nine. You will recall that the envy scale is logarithmic.
Pathetic challenge: If they are so clever, let's see them write a GUI dialog with this technique. A complex one with lots of tabs and maybe a slider. And make it look nice.
What to do if one becomes trapped in the house: If you can possibly do so without putting yourself at risk, open the front door and see it run friskily out onto the snowblack on white, black on white, black on white, and then gone. DDJ
|
|
||||||||||||||||||||||||||||
|
|
|
|