Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022

CppCon · 276K views · 2022 · 1:54:00

Open on YouTube

C, C++, Rust, Go & systems languagesProgramming language designtalkdated

Why Hacker News recommends it

HN recommends it as the main introduction to Cpp2 and cppfront, and as a credible effort to evolve C++.

What it is

Herb Sutter's CppCon 2022 talk on whether C++ can become ten times simpler and safer. He introduces his experimental Cpp2 syntax and the cppfront transpiler, explaining the limits on incremental improvement.

Recommended by 6 HN commenters across 5 different months, 2022 to 2024.

What Hacker News said

Strong rec karmakaze · 2022-11 · on “Can C++ be 10x Simpler and Safer?”

There are so many shallow comments for this deeply thought out, 7 year effort to date. If the rest of the 'to do' items gets tackled, implemented in prototypes, and made into proposals as some of the work to date has been handled, this has the best chance of being a true C++ successor. The goal is nothing more than fulfilling these B. Stroustrup quotes: "Inside C++, there is a much smaller and cleaner language struggling to get out." (1994) "Say 10% of size of C++ in definition and front-end compiler size. ... Most of the simplification would come from generalization." (2007) There's a summarization at 1:14:39[0] where concepts are listed on the left, and C++ syntax for handling these concep

Strong rec JNRowe · 2024-03 · on “Overview: What are Cpp2 and cppfront? How do I get and build cppfront?”

Sutter's 2022 cppcon talk¹ is a great introduction to the topic, both the problems it attempts to solve and solutions it was/is settling on. One of those few talks that left me genuinely enthused about the topic. [It is probably worth watching for the Compiler Explorer interjection toward the end alone -- Matt Godbolt Appreciation Society] ¹ [this video]

Recommends cpeterso · 2022-11 · on “Const vs. constexpr vs. consteval vs. constinit in C++20”

For people curious about Herb's Cpp2, here's a presentation he gave at CppCon 2022: "Can C++ be 10x Simpler & Safer? (Simplifying C++ #9 of N)" [this video]

Recommends norman784 · 2022-12 · on “C++23: std:out_ptr and std:inout_ptr”

I agree that ideally everything should be written in safer alternatives, in most scenarios is not feasible to migrate from C++ to another language, because of the code base size. I think cppfront[0] is the way to go if you want to write a safer language on top of C++, you can watch the talk about it here[1]. [0] [LINK] [1] [this video]

Recommends jdlyga · 2023-01 · on “The Year of C++ Successor Languages”

There is a much safer and simpler language hiding inside of C++ waiting to be discovered. If anyone can help reform the language, it's Herb Sutter with his cpp2 syntax. It's very much an experimental hero project, but it's promising: [this video]

Recommends taraharris · 2023-02 · on “Will Carbon Replace C++?”

Has anyone else looked at Herb Sutter's cpp2? For those that don't use C++, Herb is chair of the ISO C++ standards committee, and holds the position of "native languages architect" at Microsoft. [LINK] This is a good introductory talk on cpp2 by Sutter at CppCon three months ago, where he demonstrates cppfront , the cpp2 -> C++ transpiler. One of the things I like about it is that the code it generates is human-readable and fully backwards-compatible with C++. If you use cpp2 in your project and end up not liking it, you still have the same (very reasonable) C++ code that you'd write by hand today if you followed the guidelines you're supposed to already. [this video] I think this is very promisi

Cites xjay · 2023-02 · on “C++23 “Pandemic Edition” is complete”

Herb Sutter is working on a standalone, second syntax for C++ called "Cpp2" [1] to "reduce complexity 10x, increase safety 50x, improve toolability 10x, evolve more freely for another 30 years". [2] Compiler Explorer lists it under Cpp2-cppfront. [3] [1] [LINK] [2] [this video] [3] [LINK]

Cites credit_guy · 2023-02 · on “Will Carbon Replace C++?”

> And C++ just... doesn't have that many real problems. It does not have many, but it has one and it's big. It's not memory safe. Check out this talk by Herb Sutter, around minute 43: This is the first time a government [see note] has actually issued guidance to industry broadly that was the barest paraphrase away from "where possible don't use C and C++" [ Note: in this context, the "government" is the US Department of Commerce and NIST, which, according to Herb, have issued a detailed guidance in response to the Executive Order on Cybersecurity [2]. While I couldn't find that guidance, I found one by the NSA [3], which saw quite a few comments here on HN in December last year [4] ]. [1] [V