In a recent journal entry, a hacker talked about implementing a lightweight, plain C imitation of some of C++'s object-oriented features for his latest project. Some irritable person saw fit to reward this charming piece of acceptably self-congratulatory writing with a merciless and quite public deconstruction. I will spare you the platitudinous condemnation of the surf-by put-down, but I wish to take a moment to reflect on what the hacker did to «earn» it, and to consider what he might have done (or, rather, not done) instead.

Let me start by stating for the record that I think the hacker's solution is meritorious as such; that is, it solves the problem he formulated, so I approve of it on the grounds of its workingness. His approach is simple and effective, and was actually considered best-practice C in the eighties. Some people found this style long-winded, though, and facilities were soon devised to address the awkward verbosity of the incipient «object-oriented C» idioms. The pre-processors that implemented these and other improvements to C went on to become distinct languages (namely, C++ and Objective C) and communities formed around them.

Or perhaps it was the other way around, says the sociologist looking over my shoulder — but that is neither here nor there for our purposes. The point is one could reasonably expect the people who embraced these solutions to wince when someone promotes the use of the very idioms their community had so laboriously abstracted away. Did the hacker really not anticipate this response? If he did, why did he preface the presentation of his solution with an explicit rejection of C++?

I admit that I, too, think that C++ is baroque and inexpressive, but justifying one's work by scorning a mature system on which one is not an expert works against the legitimate goal of being lauded for one's skills. It puts people off, and will only earn one points with the weenies who happen to agree. Moreover, it is likely to elicit overt retaliation from vigilantes (mostly the weenies who happen to disagree) and a spot on someone's idiot list. Indeed, in the aftermath of such a gaffe, any subsequent plea aimed at demonstrating compunction and competence – however unassailable and incontrovertible – is likely to be shrugged off as «so much prejudiced ignorance» and answered with a curt dismissal.

So here's my twopence-worth of unsolicited advice for programmers who desire the recognition of their peers: share your wins (and your FAIL) and toot your own horn if you like, but try not to steal the wind from another's sails when you do. Because there's more than enough hot air to go around already — certainly enough for every foghorn blowing at C.


Comments


. .