Whelp, I haven’t written in a while (I knew this would happen), but it’s okay. Nothing like a dev conference to get me writing again.
I had been selected for two talks for DevSpace2017, which is going on as I write this. My two talks are “C++17: Not Your Father’s C++” and “Building a Development Community In Your Workplace”
I delivered the C++ talk this morning, and I thought it went quite well. What I want to address in this blog post is the state of C++, with respects to C++17. C++11 was a huge impact to the C++ community. We got Lambda’s, Type Inference, Variadic Templates, Smart Pointers, Type Traits, Constexpr, and a bunch of other game-changers.
Around the community, I’ve heard some conversations about if C++17 is a bust. Is it a joke? I think the reason for this is that people measure C++17 against C++11. But this isn’t necessarily correct. C++11 had 7 or 8 years to get moving and to introduce it’s ideas. It came all at once, and compilers had to play catch up to deliver all these cool new features.
But the C++ committee realized this was subpar. It was too much all at once. So now they are doing something a bit different. Smaller releases, more frequent. (Of course I like this idea, it’s much closer to a continuous integration mindset – and yes I know that 3 years between releases is not continuous, but for compiler releases, I’ll take it).
So instead, I measure C++ 17 against C++14. C++14 gave me a few things like make_unique and auto parameters in lambdas, but this wasn’t a game changer for me. They were quality of life improvements. C++17 on the other hand, has variants (Type-safe unions), optional, parallel algorithms, std::byte, string_view, fold expressions, plus a whole bunch of quality of life improvements.
People also complain about features that aren’t in the standard (concepts, ranges, modules, reflection, etc.). I agree, it stinks that these didn’t make it. But let’s not judge C++17 by what didn’t make it in, but instead, let’s look at what did. When I look at it this way, I consider C++17 a great improvement to the language.