Buy Beautiful C++ Book by Kate Gregory - Bookswagon
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > Beautiful C++: 30 Core Guidelines for Writing Clean, Safe, and Fast Code
Beautiful C++: 30 Core Guidelines for Writing Clean, Safe, and Fast Code

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


     0     
5
4
3
2
1



International Edition


X
About the 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++ version: 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 https://godbolt.org/z/cg30-ch0.0. Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

Table of Contents:
List of Selected C++ Core Guidelines xiii Foreword xv Preface xvii Acknowledgments xxi About the Authors xxiii Section 1: Bikeshedding is bad 1 Chapter 1.1: P.2: Write in ISO Standard C++ 3 Chapter 1.2: F.51: Where there is a choice, prefer default arguments over overloading 13 Chapter 1.3: C.45: Don't define a default constructor that only initializes data members; use in-class member initializers instead 23 Chapter 1.4: C.131: Avoid trivial getters and setters 31 Chapter 1.5: ES.10: Declare one name (only) per declaration 41 Chapter 1.6: NR.2: Don't insist to have only a single return-statement in a function 49 Section 2: Don't hurt yourself 59 Chapter 2.1: P.11: Encapsulate messy constructs, rather than spreading through the code 61 Chapter 2.2: I.23: Keep the number of function arguments low 71 Chapter 2.3: I.26: If you want a cross-compiler ABI, use a C-style subset 79 Chapter 2.4: C.47: Define and initialize member variables in the order of member declaration 87 Chapter 2.5: CP.3: Minimize explicit sharing of writable data 97 Chapter 2.6: T.120: Use template metaprogramming only when you really need to 107 Section 3: Stop using that 119 Chapter 3.1: I.11: Never transfer ownership by a raw pointer (T*) or reference (T&) 121 Chapter 3.2: I.3: Avoid singletons 129 Chapter 3.3: C.90: Rely on constructors and assignment operators, not memset and memcpy 139 Chapter 3.4: ES.50: Don't cast away const 149 Chapter 3.5: E.28: Avoid error handling based on global state (e.g. errno)159 Chapter 3.6: SF.7: Don't write using namespace at global scope in a header file 169 Section 4: Use this new thing properly 179 Chapter 4.1: F.21: To return multiple "out" values, prefer returning a struct or tuple 181 Chapter 4.2: Enum.3: Prefer class enums over "plain" enums 193 Chapter 4.3: ES.5: Keep scopes small 201 Chapter 4.4: Con.5: Use constexpr for values that can be computed at compile time 213 Chapter 4.5: T.1: Use templates to raise the level of abstraction of code 225 Chapter 4.6: T.10: Specify concepts for all template arguments 235 Section 5: Write code well by default 45 Chapter 5.1: P.4: Ideally, a program should be statically type safe 247 Chapter 5.2: P.10: Prefer immutable data to mutable data 259 Chapter 5.3: I.30: Encapsulate rule violations 267 Chapter 5.4: ES.22: Don't declare a variable until you have a value to initialize it with 275 Chapter 5.5: Per.7: Design to enable optimization 285 Chapter 5.6: E.6: Use RAII to prevent leaks 293 Envoi 305 Afterword 307 Index 309

About the Author :
J. Guy Davidson, head of engineering practice at Creative Assembly, works on its Total War game franchise, curates its catalogue, and improves programming standards across its engineering team. He serves on the ISO C++ committee, moderates the #include discord server, speaks at C++ events, and offers C++ mentoring support through Prospela and BAME in Games. Kate Gregory has 40+ years of development experience in multiple languages. She has keynoted on five continents, and volunteers in many C++ activities, especially #include , which is making the industry more welcoming and inclusive. Since 1986 she and her husband have run Gregory Consulting, helping clients worldwide become more effective.


Best Sellers


Product Details
  • ISBN-13: 9780137647842
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Height: 230 mm
  • No of Pages: 352
  • Spine Width: 22 mm
  • Weight: 664 gr
  • ISBN-10: 0137647840
  • Publisher Date: 26 Jan 2022
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Sub Title: 30 Core Guidelines for Writing Clean, Safe, and Fast Code
  • Width: 176 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Beautiful C++: 30 Core Guidelines for Writing Clean, Safe, and Fast Code
Pearson Education (US) -
Beautiful C++: 30 Core Guidelines for Writing Clean, Safe, and Fast Code
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

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

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    Fresh on the Shelf


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!