Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Debunking C++ Myths
  • Table Of Contents Toc
  • Feedback & Rating feedback
Debunking C++ Myths

Debunking C++ Myths

By : Alexandru Bolboacă, Ferenc-Lajos Deák
close
close
Debunking C++ Myths

Debunking C++ Myths

By: Alexandru Bolboacă, Ferenc-Lajos Deák

Overview of this book

Think you know C++? Think again. For decades, C++ has been clouded by myths and misunderstandings—from its early design decisions to misconceptions that still linger today. Claims like "C++ is too hard to learn" or "C++ is obsolete" are often rooted in some truth, but they are outdated and fail to capture the language’s ongoing evolution and modern capabilities. Written by industry veterans with over 40 years of combined experience, this book uncovers the myths, exploring their origins and relevance in the context of today’s C++ landscape. It equips you with a deeper understanding of advanced features and best practices to elevate your projects. Each chapter tackles a specific misconception, shedding light on C++'s modern features, such as smart pointers, lambdas, and concurrency. You’ll learn practical strategies to navigate common challenges like code portability and compiler compatibility, as well as how to incorporate modern best practices into your C++ codebase to optimize performance and future-proof your projects. By the end of this book, you’ll have a comprehensive understanding of C++'s evolution, equipping you to make informed decisions and harness its powerful features to enhance your skills, coding practices, and projects.
Table of Contents (15 chapters)
close
close

The limits of modern C++

Let’s assume for a moment that we use only STL collections, we avoid pointers, and when we really need them, we use the smart pointers implemented in the standard library, and we write our types with memory safety in mind. Are we done?

Herb Sutter, one of the well-known members of the C++ standardization committee, has looked at this issue and at the more general issue of avoiding security issues in C++, in a blog post titled C++ safety, in context (https://herbsutter.com/2024/03/11/safety-in-context/) published on March 11, 2024. His conclusion is that it’s too easy to write C++ code that by default has security and safety vulnerabilities. The article identifies four areas that need more attention: types, bounds, initialization, and lifetime. Then, he states that there are already some mechanisms in place in C++ 20: span, string_view concepts, and bound-aware ranges. What is missing from the language, as the article discusses next, is safety...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY