Wednesday, July 25, 2007 4:23 pm. As I was conducting a leisurely personal survey of everything in comp sci for the last few decades, I revisited this seminal COM (which apparently doesn’t mean “Component Object Model” or at least no one will admit to it) book (1998 1st edition) and, reading the first chapter, found Box’s complaints about C++ were embarrassingly comparable to some of the stupider C++ complaints about K&R! ... Just as the C++ fanatics sometimes imagine K&R were, for instance, too stupid to implement references, Box pretends that the C++ designers were too stupid to contrive a system that could be installed in DLLs and used as a “black box” component system — when it obviously isn’t like that!. ... My goodness! Was this the entire philosophical lure of COM!?!? ... It’s the old false-dichotomy racket! ... A won’t do this or that, and B will — so use B. Nevermind C or D or E. ... Just because something that was never likely to work in C++ doesn’t work there and “works” with COM — voila!, use COM....
... But then by the end of the chapter he’s calmed down and so-lucidly led us into seeing how, with just a few — well, perhaps more than a few — cunning idioms, we can talk black-box object COM with poor ol’ C++, an exercise as simple and elegant as, say, convincing a motor boat to mow your lawn. ... I can hardly wait for further exposition in subsequent chapters....
...
But not to worry; COM is quite obsolete today. ...
It’s been eclipsed by Microsoft’s latest fad, NET — which, approximately, was what instigated
my geezer education program; specifically I was perusing Sivakumar’s
C++/CLI In Action
and, covering all bases, he includes a COM example — a technology
I had
managed to avoid all through its ascendancy and halcyon days of
relentless Microsoft flogging. ... Sivakumar’s
book represents a definite style change in technology writing
as compared to Essential COM
— whose “camp meeting” tone, to be sure, was common in
that antediluvian era. ... Box actually boasts
in his preface that it takes
six months and an “epiphany” to really “get”
COM1
—
seemingly a
troubling admission, in retrospect and, judging by COM’s subsequent
vicissitudes,
it may’ve taken longer; much
longer. ... Sivakumar, on the other hand, only claims to help
developers who want to drag some C/C++/MFC
code kicking and screaming into the brave new
NET
era, and doesn’t suggest you throw away your crutches and walk
again.
... He’s enthusiastic about C++/CLI, but doesn’t slobber all
over
things, and doesn’t bother disparaging the pitiful defenseless past
(unlike me!)2....
... I rail about reuse elsewhere; it’s the basic excuse for most of the software storms that have disturbed my imaginary world over the passing years. ... I would have to opine it turned out nobody really wanted to reuse things that badly! ... Just as Box was complaining about the dreadful waste of duplicate library binary code in every single program that used it, hard disks and memory were getting so huge it just doesn’t matter — and in any case, I’ve always thought it kind of silly to worry about that kind of thing when you’re using the petite and agile Windows! ... And it seems people — even programmers! — are inclined to reuse when they have to: I reuse the system calls in whatever Windows operating system winds-up in my hardware (except for the charming imini), willingly or unwillingly, but it’s the only way, as a practical matter, to talk to the hard drive and put pretty things on the screen. ... And then it turned-out the web runs at internet speed — comparatively slow, so one doesn’t need binary interfaces to anything, you can just shoot sloppy XML or whatever ’round the place, and that’s how the future looks! ... Somebody’ll use google maps on his site, because he can’t rewrite google maps — or whatever — so he reuses it! ... I.e., because it’s there, relatively cheap (or free), and it’s that or nothing....
1. I am reminded of the arrogant Macintoshers in their day, and their scorn at MSDOS programmers who imagined they could learn to write mac programs in a few weeks or a month! ... “Ha!” they cried, “it takes months and years!”, and were so proud. ... I, of course, did write at least one Mac program in 2 or three months, but I cheated; among other underhanded advantages, I use the latter-day EZ mac, the rational OS X Unixoid “cocoa” “Xcode IDE” mac — which is only 5 or ten times harder than Windows....
2. More on Sivakumar’s book.