I am a fully paid up member of the ACCU. I joined because it seemed most of my now ex-colleagues were members and I’m a sucker for peer pressure.

Anyway, as you’d expect from a magazine dedicated to C and C++ users it occasionally has articles about C and C++. This quarter’s doozy is from a chap we’ll call Stuart. Now it looks like some of the things that Stuart is doing for his PhD are quite interesting. However his article about the similarities he has managed to draw between Haskell and using partial-template specializations in C++ gives me the shudders. It is based, in part, on the work of Andrei Alexandrescu. As charming as Mr Alexandrescu is in person I wouldn’t let him anywhere near any of my production C++ code (if I had any). But that’s beside the point.

Now I have to admit that I don’t know any Haskell and I’m also not a lover of C++ much either so I can’t bring myself to actually RTFA. However the article is full of little code snippets like this:


    template <typename T> struct Head;
    template <int x, typename xs>
       struct Head<IntList<x,xs> > {
       enum { value = x };
    };

    template <typename T> struct Tail;
    template <int x, typename xs>
       struct Tail<IntList<x,xs> > {
        typedef xs result;
    };

Why anyone would hate themselves enough to actually do this and write about it I don’t know. Especially when you could just use Haskell and not have to wrap your head around this lunacy.

But I know there is a simple answer. I should just unsubscribe from the magazine if I don’t like it. But sadly for me it’s not that simple. Stuart is obviously a clever guy, it almost goes without saying. But he’s wasting his brain cycles. Surely he must have better things to do with his time.

Then I read this 2005 interview with the glorious Alan Kay. If you have the time I suggest you read all of it because he makes some really very excellent points. In reference to my pain though this one stands out:

Perhaps it was commercialization in the 1980s that killed off the next expected new thing. Our plan and our hope was that the next generation of kids would come along and do something better than Smalltalk around 1984 or so. We all thought that the next level of programming language would be much more strategic and even policy-oriented and would have much more knowledge about what it was trying to do. But a variety of different things conspired together, and that next generation actually didn’t show up. One could actually argue—as I sometimes do—that the success of commercial personal computing and operating systems has actually led to a considerable retrogression in many, many respects.

You could think of it as putting a low-pass filter on some of the good ideas from the ’60s and ’70s, as computing spread out much, much faster than educating unsophisticated people can happen.

And while Stuart carries on trying to make C++ like Haskell, rather than just using Haskell, another wasted brain drops into the soup.