Jump to ratings and reviews
Rate this book

Beautiful C++: 30 Core Guidelines for Writing Clean, Safe, and Fast Code

Rate this book
Discover the Beauty of Modern C++

" Beautiful C++ presents the C++ Core Guidelines from a developer's point of view with an emphasis on what benefits can be obtained from following the rules and what nightmares can result from ignoring them. For true geeks, it is an easy and entertaining read. For most software developers, it offers something new and useful." --Bjarne Stroustrup, inventor of C++ and co-editor of the C++ Core Guidelines Writing great C++ code needn't be difficult. The C++ Core Guidelines can help every C++ developer design and write C++ programs that are exceptionally reliable, efficient, and well-performing. But the Guidelines are so jam-packed with excellent advice that it's hard to know where to start. Start here, with Beautiful C++.Expert C++ programmers Guy Davidson and Kate Gregory identify 30 Core Guidelines you'll find especially valuable and offer detailed practical knowledge for improving your C++ style. For easy reference, this book is structured to align closely with the official C++ Core Guidelines website.Throughout, Davidson and Gregory offer useful conceptual insights and expert sample code, illuminate proven ways to use both new and longstanding language features more successfully, and show how to write programs that are more robust and performant by default.

Avoid "bikeshedding": stop wasting valuable time on trivia Don't hurt yourself by writing code that will cause problems later Know which legacy features to avoid and the modern features to use instead Use newer features properly, to get their benefits without creating new problems Default to higher-quality code that's statically type-safe, leak resistant, and easier to evolve Use the Core Guidelines with any modern C++ C++20, C++17, C++14, or C++11 There's something here to improve virtually every program you write, design, or maintain.For ease of experimentation, all sample code is available on Compiler Explorer at  your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

852 pages, Kindle Edition

Published December 16, 2021

35 people are currently reading
169 people want to read

About the author

J. Guy Davidson

1 book1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
20 (32%)
4 stars
31 (50%)
3 stars
8 (13%)
2 stars
2 (3%)
1 star
0 (0%)
Displaying 1 - 6 of 6 reviews
Profile Image for Rohit Goswami.
343 reviews74 followers
January 17, 2022
4.5 rounding up. A readable, longer version of a select set of the C++ guidelines. Not much to dislike. Could have been longer, felt a bit too cute at places, but was definitely worth the hour or two it takes. That said these sort of texts are more about what one retains, so perhaps the rating is premature.
Profile Image for Travis.
874 reviews14 followers
February 23, 2024
This ranks up there with classics like Code Complete and Clean Code: A Handbook of Agile Software Craftsmanship. It is a fantastic dive into 30 of the most useful C++ Core Guidelines. Having the additional explanations and rationales for each guideline is insightful and invaluable. It's one thing to be told "what" to do or "how" to do it, it's quite another to be told "why" to do it.

This serves as a great introduction to "modern" C++ as well. In the process, it busts myths such as restricting your functions to a single exit point (which often leads to contorted paths rather than simply returning at the point the exit condition is determined). I took every chapter to heart. I was able to immediately apply many of the guidelines as soon as I read them.

I think there will be something for every C++ programmer in this book. And it's fun to read.
Profile Image for Zeh Fernando .
139 reviews2 followers
October 22, 2023
Great, inspiring, positive read that respects the reader.

A great introduction of sorts to the guidelines, with a lot of debating of the concepts and ideas from the chosen entries. If anything, I just wish it was longer.
24 reviews2 followers
May 20, 2022
A well written commentary of the commandments handed over, from up high, by the gods++ in the form of modern stone tablets:
https://isocpp.github.io/CppCoreGuide...

Abstractions and resource management are pivotal points in the book - master those and you'll write beautiful C++ it is preached.

Skip church and read this book.
14 reviews3 followers
February 4, 2024
The absolute majority of Core Guidelines covered in the book are trivial and well known for any practicing C++ programmer (including the reasoning behind these guidelines). Plus code examples are incomplete.
9 reviews4 followers
May 17, 2022
An excellent book that digs into the concepts and philosophies of programming in C++ to deliver a highly-readable guide on how to write C++ well as opposed to merely how to write C++.
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.