Old Man C++

So I never wrote that next article on DLLs.

It’s five years since I wrote my “Old Man C++” series of blog posts on the changes I’ve observed in the software development world since I ‘came up’ in the mid-90s. I was going to talk about Windows DLLs, and all wonderful and horrific things that go with them, and I never got around to it. I probably still won’t – the short version is that DLLs suck, and that will probably never change.

It’s been an interesting ride for C++ since I wrote those pieces. The Great Renaissance triggered by the 2011, 2014 and 2017 updates to the standard has well and truly taken hold, and C++ seems to be back in the news again. Those updates made some important changes to the language that go well beyond a few added features here and there. Things like lambdas, variadic templates and (truly) smart pointers have not only made C++ more powerful, but fundamentally changed its paradigms and best practices.

It’s not your grandfather’s C++ any more.

I’d like to pick up this series again, and explore some of the new features of C++, with a separate article on each thing… but for now, I just want to comment on the overall changing “flavour” of the language in general.

First of all, it’s pretty clear that C++ has been heavily influenced by the faster development of the lesser er… newer languages like Python, Ruby, JavasScript and Java. Saner loop constructs, lambdas, (truly) smart pointers and all the things that just seem to ‘make sense’ now have all been around for a while, but the recent popularity of modern languages has changed our expectations – these things are no longer ‘nice to have’, but essential to better designs, more readable code, and so on.

Secondly (and notwithstanding what I just said), C++ has, if anything, become more “C++-like” in that each iteration of the standard lets us do more at compile-time with types, in contrast to the dynamic / scripting languages, which tend to push everything to compile-time. Template, while insanely complicated to grok, are a key to this, and it’s one of C++’s great strengths as a systems language.

Thirdly – and this is a subtle corollary of the above – a lot of the advantages of dynamic typing that we see at runtime in scripting languages are starting to appear in C++, but you get them at compile time through templates. Things like SFINAE give C++ capabilities that are very much like ‘duck typing’ at compile-time, and C++ Concepts will hopefully improve this in C++20.

Back in the 90s, when C++ was first becoming popular, the main trend in C++ seemed to be just as much about distinguishing C++ from its roots in C, as supporting Objected Oriented techniques. The truth is that C++ was always a multi-paradigm language, but I think that’s far more apparent in Modern C++ that previously. Nowadays, developments in the C++ language, and the associated developer culture, seem to be more about enhancing its unique strengths, than simply being “not C”.

Some of the C++-related topics I’d like to look at in future posts include:

  • Specific cool new language features like auto, lambdas and smart pointers
  • New implementation paradigms
  • Compilers and other tools
  • Cross-platform development
  • Parallelism and asynchronous operations
  • Contra-indications – when C++ might not be the best choice

I’d like to think these will be useful mainly to developers who might not have looked at C++ in a while.

Note: Previous parts of this series can be found at: