Explore the origins of C++ myths and their relevance today, learn to sidestep common pitfalls, and adopt modern best practices to master the evolving C++ programming landscape
Key Features
- Trace the origins of C++ misconceptions and understand why they persist
- Learn to avoid pitfalls caused by misunderstood C++ standards
- Leverage the lesser-known features of the C++ programming language
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
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.
What you will learn
- Comprehend the history of C++ and the design decisions that shape modern challenges
- Master program flow and its underlying principles to resolve issues effectively
- Tackle incompatibility across compilers and platforms with ease
- Identify issues and avoid writing code that may lead to undefined behavior
- Explore advanced C++ features not typically covered in academia
- Address concerns about compiler code generation and optimizations
- Understand why undefined behavior remains intentionally undefined
Who this book is for
This book is for intermediate-to-advanced C++ developers looking to deepen their understanding of the language’s complexities. It is perfect for coders eager to avoid common mistakes, hackers, scholars with a sense of humor, or anyone with an interest in C++. Programmers who want to expand their knowledge, refine existing skills, explore new paradigms, or dive into the nuances of C++, will find valuable insights. Technical leads and software engineering managers adopting new technologies or navigating the C++ ecosystem will also benefit from this book.
Table of Contents
- C++ Is Very Difficult to Learn
- Every C++ Program Is Standard-Compliant
- There’s a Single C++, and It Is Object-Oriented
- The Main() Function Is the Entry Point to Your Application
- In a C++ Class, Order Must There Be
- C++ Is Not Memory-Safe
- There’s No Simple Way to Do Parallelism and Concurrency in C++
- The Fastest C++ Code Is Inline Assembly
- C++ Is Beautiful
- There Are No Libraries For Modern Programming in C++
- C++ Is Backward Compatible … Even with C
- Rust Will Replace C++
About the Author
Alexandru Bolboacă is a CTO, passionate polyglot programmer, senior trainer, and advisor at Mozaic Works. With over 20 years in software development, he has worked in various industries and across European countries, as well as the UK and the USA. He has been involved in large projects in sectors such as banking and financial services, energy, telecommunications, pharma, and eHealth. Drawing from practical experience, he advises and teaches architecture and usable software design, evolutionary design, crafting code, clean code, secure coding, and refactoring legacy code. Alex enjoys helping teams and organizations understand and build strategies for successful and robust products, built-in quality, and motivation.
Ferenc-Lajos Deák is a seasoned software developer with a strong foundation in mathematics and theoretical computer science, currently based in Trondheim, Norway. His career spans roles across diverse domains, including autonomous vehicles, real-time traffic systems, multimedia, and telecommunications. An avid open-source enthusiast, he maintains several live projects and has authored more than a dozen articles for various technical publications, focusing on one of his passions: programming.