CppCoreGuidelines

The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++ (by isocpp)

CppCoreGuidelines Alternatives

Similar projects and alternatives to CppCoreGuidelines

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better CppCoreGuidelines alternative or higher similarity.

CppCoreGuidelines discussion

Log in or Post with

CppCoreGuidelines reviews and mentions

Posts with mentions or reviews of CppCoreGuidelines. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-09-08.
  • Don't defer Close() on writable files
    7 projects | news.ycombinator.com | 8 Sep 2024
    > close a file (which ironically is the poster child for RAII)

    Yes, I call this "RAII is a lie" (T-shirt pending).

    Closing file descriptors is univerally used to showcase RAII, but it should never be used for that.

    C++ has the same problem:

    https://github.com/isocpp/CppCoreGuidelines/issues/2203

    In there, it is acknowledged that a manual Close() should always be provided, and used if you want guarantees.

    > is a bad pattern

    Good that Rust at least figured it out early that it's a bad pattern!

    Never use RAII in situations where the cleanup can fail!

  • CppCoreGuidelines: Essential Rules and Best Practices for C++ Developers
    1 project | news.ycombinator.com | 15 Aug 2024
  • What to do if you don't want a default constructor?
    1 project | news.ycombinator.com | 20 Jul 2024
    The standard library types are guaranteed to be in a useful state after being moved from (the term "valid state" is used for this). Of course, that doesn't mean that your own types have to, but the C++ Core Guidelines suggest doing so [1].

    1: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...

  • I Have No Constructor, and I Must Initialize
    4 projects | news.ycombinator.com | 5 Jul 2024
    It’s in the cpp core guidelines: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...

    std::reference_wrapper still can’t save you from yourself, but its slightly better.

  • Fixing a memory leak of xmlEntityPtr in librsvg
    1 project | news.ycombinator.com | 24 Jun 2024
    Slightly tongue in cheek answer: it is easy to write this kind of code in C++ without having C involved, hence style guides will usually have a prominent guideline specifically against this type of code[1].

    In Rust, I think you only really run into this issue when interacting with C (or otherwise engaging in unsafe code), so for normal Rust coding it doesn't need to be spelled out as a guideline. And the Rustonomicon[2], the go-to resource for unsafe Rust, isn't really written as a set of guidelines. At least from a brief search, I found it harder to find a Rust page that specifically says "don't do this".

    1: E.g. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines..., the first guideline in the "resource management" section.

    2: https://doc.rust-lang.org/nomicon/intro.html

  • Zig vs. Rust at work: the choice we made
    4 projects | news.ycombinator.com | 20 Jun 2024
  • C++ Core Guidelines
    3 projects | news.ycombinator.com | 26 May 2024
    1 project | news.ycombinator.com | 13 Dec 2023
  • Are We Modules Yet?
    3 projects | news.ycombinator.com | 1 May 2024
    If you aren't aware of the c++ core guidelines[1] - it should be on your radar.

    Also, it might not be a popular opinion, but I think Bjarne's books are just fine.

    A Tour of C++ (3rd edition) [2]

    Principles and Practice Using C++ (3rd Edition) was just published in april 2023 [3]

    [1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...

  • Learn Modern C++
    6 projects | news.ycombinator.com | 26 Dec 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 13 Nov 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic CppCoreGuidelines repo stats
315
42,824
7.1
20 days ago

Sponsored
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai

Did you konow that CSS is
the 17th most popular programming language
based on number of metions?