My CppCon 2018 talk title and abstract

In just 10 days, we’ll be at CppCon! I can hardly wait for Bjarne’s new opening keynote and the 100+ other sessions… we have a really great lineup of speakers again this year.

I’ll be giving a talk as well, and here’s the title and abstract for what I’ll be covering this year. I hope to see many of you in sunny Bellevue, WA, USA soon.

 

Thoughts on a more powerful and simpler C++ (5 of N)

Perhaps the most important thing we can do for C++ at this point in its evolution is to make sure we preserve its core strengths while also directing its evolution in ways that make it simpler to use. That is my own opinion at least, and so this talk starts with a perspective question: What “is C++,” really? The language continues to evolve and change; as it does so, how can we be sure we’re picking C++ evolutionary improvements that not only don’t lose its “C++-ic” qualities, but make it a better C++ than ever?

At recent CppCons, I’ve spoken about several of my own personal C++ evolution efforts and experiments, and why I think they’re potentially important directions to explore for making C++ both more powerful and also simpler to use. The bulk of the talk is updates on two of these:

Lifetime and dangling. At CppCon 2015, Bjarne Stroustrup and I launched The C++ Core Guidelines in our plenary talks. In my part starting at 29:06, I gave an early look at my work on the Guidelines “Lifetime” profile, an approach for diagnosing many common cases of pointer/iterator dangling at compile time, with demos in an early MSVC-based prototype. For this year’s CppCon, I’ll cover what’s new, including:

  • use-after-move diagnoses
  • better support for the standard library out of the box without annotation
  • more complete implementations in two compilers: in MSVC as a static analysis extension, and in a Clang-based implementation that is efficient enough to run during normal compilation
  • the complete 1.0 Lifetime specification being released on the Guidelines’ GitHub repo this month

I’ll summarize the highlights but focus on what’s new, so I recommend rewatching that talk video as a refresher for background for this year’s session.

Metaclasses. In my CppCon 2017 talk, I gave an early look at my “metaclasses” proposal to use compile-time reflection and compile-time generation to make authoring classes both more powerful and also simpler. In this case, “simpler” means not only eliminating a lot of tedious boilerplate, but also eliminating many common sources of errors and bugs. For this year, we’ll cover what’s new, including:

  • an update on the Clang-based implementation, which now supports more use cases including function parameter lists
  • new examples, including from domains like concurrency
  • an updated P0707 paper, with more links to working examples live on Godbolt, being posted in the next few weeks for the pre-San Diego committee mailing

 

6 thoughts on “My CppCon 2018 talk title and abstract

  1. Apologies if this is supposed to be obvious, but… what’s with the “5 of N”, and where/which are 1-4 of N?

  2. You’re placing a lot of faith in the MSVC guidelines checker… a checker which completely broke even figuring out if variables were initialized correctly in 15.8.x ……. :-/ come on guys…

  3. JCAB, my guess, this is his 5th keynote at CppCon
    2014: Back to the Basics! Essentials of Modern C++ Style
    2015: Writing Good C++14 By Default
    2016: Lifetime Safety… By Default: Making Code Leak-Free by Construction
    2017: Meta: Thoughts on generative C++

  4. @Greg Yes, this is the 5th talk in a line that deserves to be connected together by a Simplicity theme, because that’s what motivates the topics. The topics otherwise look very different, but all are motivated and tied together by that central theme, and are central to achieving that theme.

    In slightly more detail:

    CppCon 2014: How to use smart pointers (remove classes of errors with manual delete), how to initialize variables, and how to pass parameters (just the latter is ~9% of all published C++ rules, seriously, no kidding… I counted)

    CppCon 2015: The Guidelines launch, and the Lifetime profile in particular to address dangling pointers/iterators/etc. (both about encouraging simpler code and removing classes of errors and latent bugs)

    CppCon 2016: How to use smart pointers (in more detail), and leak-freedom to address the cases where we do need to express actual or potential cycles (experimental approach of tactical GC arenas)

    CppCon 2017: Mini intro on spaceship comparison, then reflection+generation+metaclasses to simplify writing classes (for both comparisons and class authoring, the common theme is less boilerplate + removing classes of errors)

    So simplicity is the theme that ties them together.

  5. I just watched the talk on youtube, really great one. One comment about the syntax change with class() really got me thinking about how metaclasses could be used when combined with each other.
    I came up with a different implementation (or at least some kind of sketch) of your property example (https://godbolt.org/z/1tE3Hy), where the property support can be opted in and property members are just marked.
    There are a lot of things I don’t know how they work but it is still a lot of fun to play around with this feature.

Comments are closed.