I find C++ interesting. No, not because my compiler can spit out an incoherent set of errors if I fail to include all of the right headers to appease the angry STL gods. And, no, not because its population of practioners has reached a steady state and is now beginning a slow decline.
I find it interesting because there's a lesson to be learned about how it conquered an existing community. The tactic it took was deceptively simple yet its one that technologists, especially the "system architects", rarely learn.
To understand what happened, we need to fire up the way back machine. Before P2P, before spam, before the web, before the Internet was even close to being mainstream, we need to go back to a time when the Macintosh was still running on those old school 68k Motorola chips.
C++ was born in a world that was clearly on its way to being dominated by C. In the late 1980's, C had become the language of choice for many CS graduates. It was just respectable enough to be taught, and fast enough to be useable for that degrading domain of problems known as "the real world".
The only real competition that C had faced was from such powerful threats as Pascal, Basic, Fortran, and Cobol. Pascal briefly flirted with fame but flamed out. Basic won its market share, but could never shake the stink of its backwater roots, undeserved as it may be.
With that, we're left with the only two real contenders. Fortran was for the slide ruler crowd and Cobol was, well, it was Cobol. C found the then perfect balance between respectable programming language and reasonable business tool. From there, it took over the development scene.
Now yes, of course I'm aware that there are many other languages out there. There was Ada, but it had all the sex appeal of a 800 page requirements document from the US Department of Defense. Nothing was as entrenched as Fortran, Cobol, and Basic across such a large swath of development arenas.
In any given system that used any of these classic programming languages, one could achieve a semi-plausible detente between most of them. Interoperability between any of them was never perfect, but it was certainly doable. Depending upon your operating system, Fortran could call into Cobol or even Basic into Fortran. Link level compatibility was possible
Let's not forget that the Mac had an early love affair with the Pascal community that resulted in its Pascal calling convention and prediliction towards Pascal strings. Fortunately, the Mac was cured of that silliness.
The C programming language fit very naturally into this tranquil world. On most systems, C functions could call into Fortran and vice versa.
Why is this so important? Because for any new technology to take root, it must successful leverage existing legacy into which the contender wants to take over. That's just a fancy way of saying that it has to not require an organization to rewrite everything from scratch. Leverage what's already there, and you're a helpful contributor.
So C come as a helper. What makes C++ so fascinating is that it first emerges as a helper, but with enough encouragement, its transformed into the conqueror and eventually the new master to which all must yield.
The C++ language was purposefully designed to subsume as much of the existing C language as possible. Only the most observant C++ language lawyer can articulate the areas in which C compatibility was not kept.
So what does such subsumption get you?
Existing C developers could be dropped, almost entirely unaware, into a C++ compiler. Yes, there were performance differences in those early days, and yes C++ compiler's have a cranky streak to them.
Most C developers could be guilted into accepting such stringency. Even the high falutin talk of the wonderous powers of object oriented programming shamed them into using the compiler.
But in reality, all of this meant was that existing C developers would continue to write C and merely append a few more letters to their compiler invocations and their world wasn't different. Not yet. The trap was set.
C++ made the switching easier since it easily consumed all of the functionality in an existing C domain. There was nothing to rewrite. The only real code change to make was to declare those old school functions with their "extern C" magic and C++ could easily consume them.
In years before, interoperability between a C function and a Fortran function required a little bit of thought and some understanding of how the two worlds work. C++ worked differently. Heck, it just worked.
This gave considerable power to the C++ advocates who would arrive into an existing C organization. They could easily develop new functionality by leveraging the existing code base. They could co-opt the system.
On top of this, C++ at least made it feasible to declare functions such that the old school C geezers could still consume them. Granted, the old C school couldn't get access to the new fangled classes or templates, but that was ok by both parties.
The geezers weren't entirely threatened by the C++ upstarts. And if the organization was growing, the geezers were headed for management real soon anyway, so it was just a matter of time.
Its at this point in the infection process that C++ takes over. Not only does it leverage the features of the existing code base. But it offers a potpourri, a smorgasboard, a veritable endless supply of doodads and useful features that the willing and intelligent developeris able to use.
The C++ language never rammed any features down your throat. Let's not confuse the languages stance with that of the zealots in that community. You never had to use those OO features if you didn't want to.
But they were so tempting weren't they? They glistened like gold and were so much fun to use. You were young. You didn't know any better. You needed the money.
At first, the changes start in small ways. The comment style changes. /* */ evolves into //. Shortly thereafter variable declarations are sprinkled liberally in the middle of functions.
Then the inevitable happens. References find their way into function declarations and structs turn into classes with multiple inheritance. Classes pick up non-trivial constructors, and critical high level functions start throwing exceptions.
By the time the sickness has fully set in, its too late. There's no turning back. The beauty of the transformation process is that as the code base becomes more entrenched into C++ specific features, it becomes harder to get out. The code begets further C++ addiction.
Given the difficulties created by the linkers on most modern operating systems, C++ has to go through extraordinary silliness to make its function overloading available to mere mortals. But its the same silliness that serves as its defense. Once you have mangled function names, there's no hope for the rest of the classic languages like Fortran or Cobol to feel like equals.
The trap has finally triggered. There's no going home anymore. C++ took a classic maneuever. Embrace, extend, extinguish. A trojan horse.
C++ used a time tested technique for conquering a community and setting it off on a new course. Why do battle with a community when you can co-opt them into your mission?
Compatibility sells. Has for a long time. That was the whole idea behind IBM's System\360 of forty years ago. Sometimes it's called the "Network Effect". The new Intel 8086 was advertised as being "Compatible" with their older chip, the 8080 -- it wasn't, but it sold.
Upward and downward compatibility, old terms. The new version of PHP, of mySQL or of anything runs the old stuff just fine, but once you've switched, you can't go back. C++ did the same thing but with one hell of a big step. The big upgrade.
Posted by: Warren | November 21, 2004 at 04:27 AM
You're certainly right. Its not a new thing and it comes in a lot of flavors too. I think my particular attraction to C++ as an example is that I've never seen anyone mention it before.
I also think there's other paths to the technological coup d'etat.
Posted by: ejohnson | November 24, 2004 at 07:26 AM
That has certainly been my experience. But I must admit, probably out of ignorance, that I still find sprintf and other stdio functions far superior to io-manipulators and the like. Ofcourse, one must be careful not to mix cout/printf io-streams, or all life as you know might stop instantaneously and every molecule in your body explode at the speed of light. I wonder what other 'deprecated' C features supposed C++ programmers can't give up for their OO/STL counterpart?
Posted by: kevin | December 09, 2004 at 10:49 AM
Great post, the effect is so insidious, I never noticed what had happened until reading it here. I am weak and manipulated.
Posted by: Mark W | January 17, 2005 at 10:15 AM
been reading this essay and all of the ones in "best software writing I"
just letting you know you've got a typo in this: "developeris"
"Its at this point in the infection process that C++ takes over. Not only does it leverage the features of the existing code base. But it offers a potpourri, a smorgasboard, a veritable endless supply of doodads and useful features that the willing and intelligent *****developeris***** able to "
Posted by: bofe | June 23, 2005 at 02:28 PM
C++ striked me as a natural anesthesia for my OO/Java needs while programing C. STL is only a memory-managment "recliner", so you don't have to realloc everytime you read another byte. Essentially, it's just C with classes and wierd 'ArrayList's
Posted by: Paulo Koch | June 25, 2005 at 03:17 AM
There are still holdouts:
http://www.tux.org/lkml/#s15-3
Posted by: Chris Nystrom | September 17, 2005 at 03:39 AM
If I were the Linux folks, I'd be avoiding C++ too! Resolving the semantics of exception handling inside the kernel is too much.
Posted by: eric johnson | September 18, 2005 at 12:44 AM
I think this is happening all over again with languages such as C#; allthough you can't use existing C++ code in C# as easily as it was to use C in C++, it is quite easy to turn the switch and start coding in C# once you're used to C++. However, let's not forget that there's more to it than strategy; languages do evolve, often for the better. I wouldn't want to program in C now that I have C++. On the other hand, I still prefer C++ over C# and until recently, C# was a step back in time (e.g. templates have only just been introduced). They're catching up, but it still means that C++ leads the way, which brings me to my point: quality within a language is what makes it shine, not it's strategy. I wrote a whole issue on this in my blog: http://vitamincpp.blogspot.com/
Posted by: Michiel Schaeverbeke | September 29, 2005 at 04:03 PM
Hi I'm Sonja,
As you may have guessed, I am mad about bargains.
I am a wife, a mother and I have run my own recruitment business for over twenty years.
I make my living by giving the best value for money so when I spend it I expect to get the same.
I love quality items, five star cruises and generally the good things in life and I have found
that I can afford more of them if I get them at bargain prices.
This Blog http://bargains-hunter.blogspot.com is for bargain hunters to share information
so we can all get the best value for our hard-earned money.
Cheers
Sonja
Posted by: Queriecepdero | October 12, 2007 at 09:09 PM
A man is trying a very unusual way to propose to his girlfriend. He wants people to forward an email to as many people as possible and he hopes that it will eventually get to his girlfriend. Details here: http://www.proposal-to-mary.com
Here is what he wants people to send by email:
You could help me a lot to spread my proposal to Mary – it is important that it is distributed as widely as possible so that it eventually reaches Mary. If you would like to support my proposal to Mary, please send the following text by email to a lot of people :-)
------------- SNIP (email text end) ---------------
WHEN YOU RECEIVE THIS, PLEASE HELP TO DISTRIBUTE IT TO OTHER PEOPLE!
For a long time I have tried to find a special way to propose marriage to my girlfriend Mary, whom I know for five years now. I wanted it very special, romantic and memorable, something our grandchildren would still remember.
And here is my idea: I will send out the proposal to Mary to 50 complete strangers, people I don't know - hoping, that they will forward my proposal to as many people as possible, which in turn forward it etc. And some day, I hope, it will reach Mary, after it has travelled a very long way. I know, it will take a long time and I am quite nervous…
From the poem MY Mary will know immediately that the proposal is for her.
I have created a homepage ( http://www.proposal-to-mary.com ) where you can find the current status of my quest. You can use the homepage to check if the proposal has already reached Mary (in that case it is not necessary anymore to forward the mail).
Once the proposal has reached Mary, I will put a note on these pages. Also I will publish there how many people have read the proposal so that everybody can see how far it has spread and that it is getting closer to Mary.
And of course you will find there what I am waiting for most: Mary's answer! I can't tell you, how nervous I am… Will she accept my proposal? Will she like the unusual way how she got it, through the hands of thousands of messengers all over the world?
Please cross your fingers for me! And please - help me by sending the mail to as many people as possible, to help it spread, so that it eventually reaches Mary.
And here is my proposal:
Mary, please forgive me, as you know English is not my native language. And I am not a poet. But I mean it from my heart.
My angel,
Five years ago, I will always remember the day When fate made us meet, blissful Alaskan moments in May Earth spun around us and a journey began Love, warmth, happiness, enough the years to span.
The longer it lasts the more grows our bond And with 80 still - of you I will be fond Whatever happens, I will stay at your side Through good and bad, together let us stride
No second with you was ever wasted
You are the sweetest I have ever tasted
We have spent so many years - why not a life?
Mary, will you marry me - and become my wife?
Mary, if you have received that and have recognized me, then give me a sign so that I can continue with the romantic part of my proposal…
------------- SNIP (email text end) ---------------
Posted by: playclary | October 20, 2007 at 08:04 AM
Posted by: Climamakelild | October 21, 2007 at 03:41 PM
Hello
Magnificent
resource
much better -
I in delight
criticize mine
Site
http://www.templatelux.com
Posted by: mangolweb | November 02, 2007 at 01:06 PM
Posted by: loatucraree | November 15, 2007 at 03:44 PM
"Discover How To Get Paid BIG BUCKS By Fortune 500 Companies From The Comfort Of Your Own Home...Even If You Have A Limited Educational Background And No Technical Skills!"
>>> http://fortune500.shmyl.com/ >>>
"If You Know How To Turn On A Computer And Click Your Mouse, Then Companies Such As IBM, General Motors, Coca-Cola, And Wal-Mart Want To Pay You Top Dollar Just For Your Opinion On Their Products"
Posted by: yahtfortune | January 13, 2008 at 03:54 AM
Здравствуйте!
Предлагаю посмотреть и высказать свое мнение: - http://gornostay.com.ua/
Это новейшая разработка в СНГ, горнолыжный спуск для закрытых помещений. Для тренировок используются настоящие лыжи и сноуборды, лыжные палки и ботинки.
Тренажер Gornostay может размещаться в торгово-развлекательных центрах, спортивных и горнолыжных клубах, в курортных зонах и парках.
Жду ваших отзывов.
Posted by: GornostayTM | January 13, 2008 at 11:31 AM
The person is slowly getting used to cars, mostly to the news, which are tied with the past. Either it is its manufacturer or it is its design but they have something in common. Nowdays, as concerns "alived" cars, they are mostly sport cars. The "Fathers" of today?s followers was somehow special for their age, they had something inside themselves what is alived to this times. Why had it been constructing cars which have their rootes in 50-ties, 60 –ties and 70 – ties. People know how to honour this jewel which survives even 50 years and therefore these cars are so exceptional. What do the years 1968-1973 and 2006 have in common? The only one thing, the collocation Opel GT!
NEW foto is here http://megaprirod.in/opel/image.jpg
Posted by: Nigeteetify | February 05, 2008 at 06:46 PM
We will to the conclude the Aggoriment
Posted by: yu | February 23, 2008 at 06:14 AM
It's just about sport
sport tech windshields
fiddler sport triathlon brisbane
h&r sport springs
weatherbys sport horses
extrinsic intrinsic feedback in sport
Posted by: ineniounc | December 16, 2008 at 09:20 AM
Its my world $)I ts my world $)Its my world $)I ts m
y world $)Its my world $)I ts my world $)Its my world $)I ts my world $)
Posted by: mishkamiha | December 22, 2008 at 07:29 PM
Os melhores apartamentos em Jardim Camburi estão a sua espera.
Temos as melhores opções de imóveis , preços e condições de financiamento.
Contato:
Tel 0xx27 3084-5709
[email protected]
corretorimoveisjc no gmail.com
Apartamentos de 3 quartos em Jardim Camburi
Apartamentos de 3 quartos com suíte em Jardim Camburi
Imóveis de 3 quartos em Jardim Camburi
Apartamento de 3 quartos em Jardim Camburi
Casa de 3 quartos em Jardim camburi
Cobertura de frente ao Mar em Jardim camburi.
Imoveis na Planta em Jardim Camburi
Posted by: jardimcamburi | June 04, 2009 at 10:10 PM
SMS Trap is something that never fails to help you get your partner off guard…
Our software will make reading other people’s SMS as easy as ABC.
Ready for some real spy stuff ? Want to test your beloved or just trick your best buddy ?
This is exactly what you need then ! Be aware of everything ! This is a service for you !
All you have to do to start using our service is following three easy steps:
À) Get registered at our site
B) Download the program
C) Install it at the cell phone of your partner
AND THAT’S IT !
As soon as you are done with this, you will be able to view both the sent and the incoming SMS messages here at our site, inside your account area.
You will be able to read them ALL online !
http://www.smstrap.com/go/NzAxOjA=/
Posted by: idhyougjdsyhfr | June 24, 2009 at 05:34 PM
if you've responded to the previous comments, then please feel free to send me some $ as well.
but seriously. i appreciate that compatibility sells, but i do not relish the heck on earth that is the result. i wish people would burn bridges more often.
Posted by: Raoul Duke | July 02, 2009 at 04:04 PM
and yes C++ compiler's have a cranky streak to them.
Apostrophe's and they're use's.
Posted by: Eddie Pasternak | July 02, 2009 at 05:31 PM
How are you. There is an applause superior to that of the multitudes: one's own. Help me! It has to find sites on the: Canadian retirement planning calculators. I found only this - Retirement planning easy. Remember it not where you start that is important but where you finish. Whether retirement is a long way off, or sneaking up faster than read planning for the future to figure out how much money you need to live comfortably. Thank :confused: Nediva from Fiji.
Posted by: Nediva | August 13, 2009 at 05:04 PM