Confessions of an old schooler

2023-03-30 17:00:00

I have used a lot of programming languages over the years. From Pascal (yes, indeed) to C to Python to Raku. Currenty I do most of my work with C++ and I have to admit: I kind of like it. There, I said it. What most people know of C++ is that it's and old, horrendously complicated and dangerous language. And that is, indeed, a good characterization. It's not much of a stretch to say that it took 20 years for this language to become somewhat usable. These decades left behind a history of deprecated features, outdated code and now obsolete workarounds for missing language features. It is the antithesis to an elegant, small and beautiful language.

C++ started out as an extension to C and I think it's fair to say that back then no one knew how to actually make good use of the new features. The language itself and more importantly the standard library lacked most of the tools that are needed to write maintainable, extensible and reusable high performance code that C++ was supposed to deliver. Containers, references, iterators, smart pointers, all of that came later. What the language did bring was flexibility. Turns out, the initial set of tools was just enough to bootstrap the rest, so most of today's feature set could be and indeed was prototyped first in external libraries.

The very same is true for the language that I have spent most of my professional life with: Perl. While "elegant" or "small" are words that no one has ever applied to Perl, it was and still is an extremely useful language. What C++ does for performance of the compiled code, Perl did for the performance of the developer. And while Perl lacked a lot of features that are taken for granted in other languages (like subroutine signatures, yes, really), it is flexible enough that these could be added by modules. This enabled a lot of experimentation with different concepts, styles and feature sets before they were integrated into the language proper. The experience gathered in these experiments ultimately was condensed into Raku, a language that I am also very fond of.

With C++ I enjoy the control I have over what exactly is running on the CPU and how memory is managed. At the same time I get a lot of convenience features and a compiler that tells me (granted, in many, many words) most of the stupid mistakes I make. Most of all I appreciate the flexibility and how people are using that to go beyond what the language itself has to offer.

While I would pick a more modern language like Rust over C++ for any new code base I were to start, I do enjoy building robust and fast systems with this challenging, mature and ridiculously overengineered behemoth of a language. I guess that's just part of who I am.

Managed by CiderCMS