A theme: Simplifying C++ (& CppCast podcast)

This week I was happy to join Rob Irving and Jason Turner on their great CppCast podcast. I chose “Simplifying C++” as the theme, because all of the active work I’ve chosen to do on C++ these days is on the common theme of simplifying how we teach, learn, and use C++… the “C++ UX” you might say.

Here’s the podcast: CppCast: Simplifying C++ with Herb Sutter (length: 1:07)

And here’s a table that summarizes my active projects that we mentioned in the podcast, and what specific parts of C++ that I hope each might help simplify.

You’ll notice that three common “simplification” themes get their own summary columns: Can this project reduce what we have to teach/know to use C++, so that C++ can be easier to learn and use? Can it reduce or even eliminate classes of errors, so that we can program with greater confidence? And can it reduce the need for future language features, to help reduce future complexity as C++ continues to grow and evolve?

Finally, here is the list with links:

Elements of Modern C++ Style and C++ Core Guidelines (CppCon 2014, 2015)
Lifetime profile and gcpp opt-in tracing GC allocator (CppCon 2015, 2016, 2018)
Spaceship <=> comparisons (CppCon 2017, adopted C++20)
Reflection+metaclasses (ACCU 2017, CppCon 2017 & 2018)
Lightweight exception handling (ACCU 2019, CppCon 2019)
Lightweight RTTI (CppCon 2019)

Incidentally, this pattern is why I chose the title “Thoughts on a more powerful and simpler C++ (5 of N)” for my CppCon talk last year — it was the 5th CppCon plenary session I’d given on this theme, so I thought I might as well make the theme explicit.

I hope you enjoy the podcast.

2 thoughts on “A theme: Simplifying C++ (& CppCast podcast)

  1. Least known feature of c++11, which might help with one class of dangling pointers problem.
    it is r-value reference member function combining with delete.
    Consider:
    https://godbolt.org/z/ew3LeS

    struct String
    {
        String(const char* cs)
            : string{cs} {}
    
        const char * c_str() const&
        {
            return string.c_str();
        }
        const char* c_str() && = delete;
    
        std::string string;
    };
    
  2. Dear Herb, Thank you both doing all that great work and keeping us informed. Having had an eye throughout these months on your website, I still miss the meta learning material you promised to deliver after winter. It’s almost summer now and I hope the delivery is soon. Do you talk in the podcost about that too? Any timelines? Cheers,–Hosse

In comments, use [code] [/code] for code blocks, and the same with angle brackets for code inside text paragraphs. I appreciate and try to acknowledge feedback on GotW articles; if you're suggesting an improvement for a GotW Solution post, please post under your real name (or include it in the comment text) if you would like to be acknowledged here and when the material is updated and expanded in future Exceptional C++ books.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s