CPPCON2022 Keynote Review – Can C++ be 10x Simpler & Safer?

The first time I heard about Herb Sutter was when he took over as editor of the now defunct C++ Report magazine. IIRC, the introduction by the then editor mentioned that Herb could remember over 100 digits of Pi. We’ll have to ask him about it one of these days.

One of the undeniable things over the years that can be said about C++ is that its syntax is complex. Heck, you can make a living just highlighting its complexity and how to get around it. Once you go past the proverbial Hello world program, things can get difficult very quickly. Add to that that some mainstream, table-stakes support is unavailable in Standard C++ (I’ll probably retire by the time the Networking TS is standardized).

But seriously, now with “skin in the game” (a daughter that is taking C++ for next year), I’ve pondered whether to recommend learning C++ over other systems programming languages (e.g., Go).

What’s cool about cppfront?

  • Teachable!
  • It’s been in the works for 7 years by an expert
  • Addresses core programming language design

In essence, I believe this is the direction that C++ should take.

So what did I like about this keynote? The fact that you can still write new C++ without writing current C++. Have we (the collective we ) been there before? Sure thing, Herb mentioned cfront, and TypeScript (which is the only way I’ll touch Javascript) but another language that generated C back in the late 80’s was Eiffel (heck, I remember learning about design by contract, pre/post conditions in the “orange and white” book on Eiffel.

The syntax will take a little time to get used to, but it’s manageable–we’re creatures of habit and having all operators left-to-write (or west-to-east) will require mental retraining.

Couldn’t help but think that I’ve seen motifs of the syntax in other programming languages present in the cpp2 syntax (Python, Erlang). But then, those languages most likely used syntax available in other languages, too.

So, if you have a couple of hours to spare on a lazy Sunday afternoon, as I did, check out Herb’s talk. You’ll be inspired.

Paraphrasing Dr. Seuss:

The wonderful things C++ can do.
It can use cpp syntax, or cpp2.

This entry was posted in C++, programming languages, software and tagged , . Bookmark the permalink.

Leave a comment