21st Century C++

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. GSL

    Guidelines Support Library

    I haven't read much from Bjarne but this is refreshingly self-aware and paints a hopeful path to standardize around "the good parts" of C++.

    As a C++ newbie I just don't understand the recommended path I'm supposed to follow, though. It seems to be a mix of "a book of guidelines" and "a package that shows you how you should be using those guidelines via implementation of their principles".

    After some digging it looks like the guidebook is the "C++ Core Guidelines":

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

    And that I should read it and then:

    > use parts of the standard library and add a tiny library to make use of the guidelines convenient and efficient (the Guidelines Support Library, GSL).

    Which seems to be this (at least Microsoft's implementation):

    https://github.com/microsoft/GSL

    And I'm left wondering, is this just how C++ is? Can't the language provide tooling for me to better adhere to its guidelines, bake in "blessed" features and deprecate what Bjarne calls, "the use of low-level, inefficient, and error-prone features"?

  2. CodeRabbit

    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 logo
  3. CppCoreGuidelines

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

    I haven't read much from Bjarne but this is refreshingly self-aware and paints a hopeful path to standardize around "the good parts" of C++.

    As a C++ newbie I just don't understand the recommended path I'm supposed to follow, though. It seems to be a mix of "a book of guidelines" and "a package that shows you how you should be using those guidelines via implementation of their principles".

    After some digging it looks like the guidebook is the "C++ Core Guidelines":

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

    And that I should read it and then:

    > use parts of the standard library and add a tiny library to make use of the guidelines convenient and efficient (the Guidelines Support Library, GSL).

    Which seems to be this (at least Microsoft's implementation):

    https://github.com/microsoft/GSL

    And I'm left wondering, is this just how C++ is? Can't the language provide tooling for me to better adhere to its guidelines, bake in "blessed" features and deprecate what Bjarne calls, "the use of low-level, inefficient, and error-prone features"?

  4. cppfront

    A personal experimental C++ Syntax 2 -> Syntax 1 compiler

    > And I'm left wondering, is this just how C++ is? Can't the language provide tooling for me to better adhere to its guidelines

    Well, first, the language can't provide tooling: C++ is defined formally, not through tools; and tools are not part of the standard. This is unlike, say, Rust, where IIANM - so far, Rust has been what the Rust compiler accepts.

    But it's not just that. C++ design principles/goals include:

    * multi-paradigmatism;

    * good backwards compatibility;

    * "don't pay for what you don't use"

    and all of these in combination prevent baking in almost anything: It will either break existing code; or force you to program a certain way, while legitimate alternatives exist; or have some overhead, which you may not want to pay necessarily.

    And yet - there are attempts to "square the circle". An example is Herb Sutter's initiative, cppfront, whose approach is to take in an arguably nicer/better/easier/safer syntax, and transpile it into C++ :

    https://github.com/hsutter/cppfront/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you know that C++ is
the 7th most popular programming language
based on number of references?