Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022 | Summary and Q&A

November 12, 2022
YouTube video player
Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022


This talk explores an experiment to make C++ better by focusing on safety and simplicity, aiming to reduce vulnerabilities and code complexity.

Install to Summarize YouTube Videos and Get Transcripts

Key Insights

  • 🔤 C++ is a challenging language that requires constant evolution and improvement. The speaker encourages the community to push the boundaries and focus on making C++ safer, simpler, and more toolable.
  • 🏗️ The speaker presents an experiment called "cpp2" which aims to refresh C++ by introducing a new syntax. This new syntax allows for measurable progress and focuses on safety, simplicity, and tooling improvements.
  • 🔒 The Department of Commerce in the United States has issued recommendations to avoid using memory-unsafe languages like C and C++. This highlights the importance of addressing safety issues in C++.
  • ➗ The new syntax in cpp2 enforces static safety rules by default, preventing dangerous behaviors like pointer arithmetic and bitwise operations on pointers. This helps improve bound safety and prevents out-of-bounds access.
  • ⚙️ Lifetime safety is also addressed, and uninitialized pointers are not allowed. cpp2 guarantees initialization before use, ensuring that uninitialized variables are not accessed.
  • 💼 The speaker emphasizes the need to make C++ safer and more secure, especially in the face of increasing cybersecurity threats. Addressing safety issues in C++ is crucial to protect software from vulnerabilities.
  • 🥇 The speaker's experiment aims to make C++ more readable, improve safety, and provide seamless interop with existing code. The goal is to create a language that is 10x simpler, safer, and more toolable, while remaining backward-compatible with the current C++ ecosystem.
  • 🔧 cpp2 includes features like type safety, bounds safety, lifetime safety, and initialization safety. These features address common vulnerabilities in software development and aim to make C++ more secure and robust.


I have a bit of a provocative title this year but this is actually a talk that I've been giving for seven years in pieces I'll explain what I mean by that we are all here at cpvcon and a conference is like it because we love C plus plus maybe you feel as I do C plus plus is the best language in the world for me to write the software I need and want... Read More

Questions & Answers

Q: How does the speaker plan to improve C++ in terms of safety and simplicity?

The speaker plans to refactor C++ into simpler and more composable features, while also enforcing safety measures by default. The goal is to reduce vulnerabilities and make programming in C++ easier and safer.

Q: What is the main challenge in making these improvements in C++?

One of the main challenges is balancing the improvements with the need for backward compatibility. The speaker wants to improve C++ without breaking existing code and ensuring full compatibility with the current standard.

Q: What is the speaker's perspective on using other programming languages instead of C++?

The speaker encourages the C++ community to double down on C++ itself and aim for major evolution in terms of safety and simplicity. While other languages and experiments are valuable, the speaker believes that C++ can be improved and that developers should not be quick to switch to something else.

Q: How does the speaker plan to measure the progress and success of their experiment?

The speaker aims to make progress measurable by focusing on specific metrics related to safety and simplicity. For example, the goal is to reduce the number of vulnerabilities and bugs and simplify the teaching materials for C++. The speaker also plans to present their experiment as ISO C++ proposals, allowing for feedback and validation from the community and standards committee.

Summary & Key Takeaways

  • The speaker talks about their personal experiment to improve C++, focusing on safety and simplicity.

  • The goal is to push the boundaries of C++ by making it safer and simpler, while maintaining compatibility and allowing for measurable progress.

  • The speaker discusses motivation, history, and examples related to safety and simplicity in C++.

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Explore More Summaries from CppCon 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on: