isocpp/CppCoreGuidelines
View on GitHub ↗ ★ 45,422 CSS
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
100 mentions on Hacker News by 85 people: 18 stories, 82 comments · first 2015-09-16 · latest 2026-01-26
20082026
-
…great, since errors can occur when closing the file, especially when using networked file systems. https://github.com/isocpp/CppCoreGuidelines/issues/2203
comment by sigwinch28 · 2025-12-28 · in C++ says “We have try... finally at home” -
…sense. But it's not what profiles are doing. Instead, for example, the lifetime safety profile ( https://github.com/isocpp/CppCoreGuidelines/blob/master/docs... ) is a Rust-like compile time borrow checker that relies on annotations like…
comment by Rusky · 2025-09-14 · in Safe C++ proposal is not being continued -
…recent changes. There are also the C++ core guidelines though maybe those are also out of date? https://github.com/isocpp/CppCoreGuidelines I've been looking at Rust and it's a big improvement over C, but it still strikes me as a work in…
comment by throwaway81523 · 2025-02-20 · in A tail calling interpreter for Python (already landed in CPython) -
…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…
comment by nh2 · 2024-09-18 · in Don't defer Close() on writable files (2017) -
…[2] Principles and Practice Using C++ (3rd Edition) was just published in april 2023 [3] [1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... [2] https://www.stroustrup.com/tour3.html [3]…
comment by schaefer · 2024-05-01 · in Are We Modules Yet? -
…Stroustrup would say that the C++ Core Guidelines fix this, and I think he’s referring to this: https://github.com/isocpp/CppCoreGuidelines/blob/master/docs... which seems like it’s maybe partly implemented in some version of Visual Studio…
comment by amluto · 2024-03-19 · in C++ creator rebuts White House warning -
…up to date how to write proper C++ code instead of classical C with C++ compiler, This is good too: https://github.com/isocpp/CppCoreGuidelines I also liked Scott Meyer's book "Effective Modern C++".
comment by throwaway81523 · 2022-10-30 · in A Tour of C++ (Third edition) -
…the rest, used signed numbers, as they behave like you would expect. Also, the C++ Core Guidelines: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by DrBurrito · 2022-08-24 · in Using signed or unsigned int by default in C (2015) -
…could you send them my way)? On the topic of coding standards, there's an excellent github repo https://github.com/isocpp/CppCoreGuidelines which even quotes Bjarne Stroustrup as saying "Within C++ is a smaller, simpler, safer language…
comment by compiler-devel · 2022-08-21 · in Show HN: Modifying Clang for a Safer, More Explicit C++ -
https://github.com/isocpp/CppCoreGuidelines
comment by Gupie · 2022-08-12 · in Ask HN: Who is using C++ as the main language for new project? -
Ah yes, the one that still just wraps a raw pointer in the end https://github.com/isocpp/CppCoreGuidelines/issues/1038
comment by seritools · 2022-06-22 · in Experimenting with Rust in Chromium -
…now. Instead of "fixing" the language, there's written (not enforced by the compiler) documentation https://github.com/isocpp/CppCoreGuidelines - actually the first line is the perfect summary: "Within C++ is a smaller, simpler, safer…
comment by CraigJPerry · 2021-05-13 · in Show HN: I wrote my own RTS game engine in C -
…Modern C++ mostly guarantees against leaks since it encourages the stack as much possible. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by tediousdemise · 2021-04-08 · in A simple C implementation to stream H.264 to browser using WebRTC -
…up a core guidelines doc (this was the main topic of that Bjarne talk), and it’s really good https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by CraigJPerry · 2021-03-23 · in Darker Corners of Go -
C++ Core Guidelines https://github.com/isocpp/CppCoreGuidelines Bjarne Stroustrup: C++ | Lex Fridman Podcast #48 https://www.youtube.com/watch?v=uTxRF5ag27A
comment by anonymousse1234 · 2020-09-06 · in C++20 has been approved -
…the C++17 STL, Jacek Galowicz - C++17 STL Cookbook, Scott Meyers - Effective Modern C++ books also https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... and https://en.cppreference.com and the conferences of CppCon in youtube.
comment by cglezm · 2020-08-03 · in Bjarne Stroustrup Weighs in on Distributed Systems, Type Safety and Rust -
Here is an example from a leading exponent of the commitee, ironically also from Microsoft: https://github.com/isocpp/CppCoreGuidelines/blob/master/docs...
comment by Rochus · 2020-06-13 · in Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming -
E.g. https://github.com/isocpp/CppCoreGuidelines/blob/master/docs...
comment by Rochus · 2020-06-13 · in Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming -
There are the Core Guidelines : https://github.com/isocpp/CppCoreGuidelines .
comment by manaskarekar · 2020-05-24 · in Chromium project finds that 70% of security defects are memory safety problems -
…"C++ Core Guidelines", which, like the language itself, are a couple of orders of magnitude larger: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by einpoklum · 2020-05-23 · in The Ten Commandments for C Programmers (1987) -
…parameters, e.g. with `owner<T >` or `non_null<T >` and such. The "C++ Core Guidelines" ( https://github.com/isocpp/CppCoreGuidelines ) aim to be machine-checkable whenever possible.
comment by einpoklum · 2020-05-03 · in The naked truth about writing a programming language (2014) -
Unfortunately C++ created new problems like https://github.com/isocpp/CppCoreGuidelines/issues/1038 . Lambdas in particular are a minefield.
comment by roca · 2020-02-03 · in Buffer overflow when pwfeedback is set in sudoers -
No, it is entirely possible to delete the underlying object so a reference is left dangling. See https://github.com/isocpp/CppCoreGuidelines/issues/1038 for example.
comment by roca · 2020-01-01 · in I love coding in C -
…advice, the f32 vector would be passed by value, and the f64 vector would end up in the grey zone. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by nemetroid · 2019-08-26 · in Should small Rust structs be passed by-copy or by-borrow? -
…understand the differences between the many ways of doing the same thing Check C++ Core Guidelines https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... which is a community approved collection of best practices for modern C++.
comment by AlexeyBrin · 2019-08-19 · in Dark Corners and Pitfalls of C++ -
…familiar with the basics of the language, I highly recommend taking a look at C++ Core Guidelines https://github.com/isocpp/CppCoreGuidelines
comment by filereaper · 2019-07-29 · in On Writing a C++ Book -
…thing, RIIR to get all the things. Cargo is the sleeper hit of Rust. Hygienic macros and more! [1] https://github.com/isocpp/CppCoreGuidelines/blob/master/docs... [2] https://godbolt.org/z/dymV_C [3] https://godbolt.org/z/_midIP [4]…
comment by wyldfire · 2019-07-10 · in Catching use-after-move C++ bugs with Clang's consumed annotations -
…in C++, and personally I prefer using it, together with -Wshadow to catch possible issues. 0: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by nemetroid · 2019-05-28 · in Simple Dockerfile examples are often broken by default -
…if you're seeking substantial levels of assurance or safety. Even the C++ Core Guidelines effort, https://github.com/isocpp/CppCoreGuidelines which is the closest thing to what you describe and is driven by influential members of the ISO…
comment by 0815test · 2019-04-23 · in Modern C++ Won't Save Us -
The C++ lifetime proposal doesn't seem have to a lot to do with templates. https://github.com/isocpp/CppCoreGuidelines/blob/master/docs... Are you talking about something else?
comment by kccqzy · 2018-12-28 · in Rust 2019 and beyond: limits to some growth -
…in existence (maybe except Java). Instead of looking at cppreference.com, maybe consider browsing https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... the Cpp Core Guidelines, this outlines a forward looking vision of how good…
comment by orbifold · 2018-11-08 · in Is it time to rewrite the operating system in Rust? [slides] -
> Maybe if they started defining a 'modern c++' subset... Here it is: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by 0-_-0 · 2018-10-30 · in C++17 constexpr Compile-time Ray Tracer (2017) -
Like C++ Core Guidelines? https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by berti · 2018-09-29 · in CppCon 2018: Simplicity: Not Just For Beginners [video] -
…readability... well, there remains the fact that they still need to be used with extreme care. See https://github.com/isocpp/CppCoreGuidelines/issues/1038 for an example of what I'm talking about. So, readability increases, but the mental…
comment by Yoric · 2018-09-28 · in CppCon 2018: Simplicity: Not Just For Beginners [video] -
…better alternative might be to incrementally update the code to C++17 following C++ best practices https://github.com/isocpp/CppCoreGuidelines . That way you always have a working product, that has the features and performance that people…
comment by RcouF1uZ4gsC · 2018-09-19 · in Migrating Passenger from C++ to Go? -
…want more specifics and detail, the CppCoreGuidelines have a section on when to use which string. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by humanrebar · 2018-05-10 · in How to Adopt Modern C++17 into Your C++ Code [video] -
The guidelines seem like a document to me: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by icebraining · 2018-05-04 · in 7-Zip: From Uninitialized Memory to Remote Code Execution -
It's supposed to be part of "Guideline support library", see this section: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... The only implementation so far seems to be from Microsoft: https://github.com/Microsoft/GSL/blob/mast…
comment by nuxi · 2018-03-09 · in C++ Core Guidelines -
…the newest gcc with -std=c++1y at godbolt.org. It seems potentially useful, if it actually exists. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by usefulcat · 2018-03-09 · in C++ Core Guidelines -
…int, or whatever). Their examples [1] conveniently omit size_t to push their alternative. [1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by Matheus28 · 2018-03-09 · in C++ Core Guidelines -
Read the Core Guidelines. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by clarkrinker · 2018-03-07 · in Ask HN: Best way to learn modern C++? -
I'd add the CppCoreGuidelines to the list: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... It's a lot of the content in the above but crowdsourced, open for PRs, searchable, and readable from the browser.
comment by humanrebar · 2018-03-07 · in Ask HN: Best way to learn modern C++? -
…work to have linters advice on the Core Guidelines items, which are considered the best practices. https://github.com/isocpp/CppCoreGuidelines For those that aren't aware, actually some of the input from Microsoft side was based in the…
comment by pjmlp · 2017-10-24 · in C++17 Is Here: Interview with Herb Sutter -
Use string_view, but beware of use-after-free bugs like https://github.com/isocpp/CppCoreGuidelines/issues/1038
comment by mbrubeck · 2017-10-22 · in C++ Tips of the Week -
…library: http://en.cppreference.com/w/ The following is a longer guide on modern C++ style: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by pveierland · 2017-09-07 · in C++17 is formally approved -
C++ Core Guidelines: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by sachinjoseph · 2017-07-08 · in Ask HN: Name good examples of Modern C++ usage -
…hear the term "modern c++" these days. - https://en.wikipedia.org/wiki/Modern_C%2B%2B_Design [2] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
comment by sclangdon · 2017-06-26 · in Does the Boost library meet its original goal? -
…apply them to C, Ada, Obj-C, Pascal, etc. If you look for C++ specific guidelines I suggest this: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... I am saying this since C++ gives you a lot of power, but also a lot of…
comment by partycoder · 2017-06-04 · in C++ Coding Guidelines (2014) -
…to bring Rust-like memory safety guarantees to C++. Has anyone here had a chance to try it out? https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... https://github.com/Microsoft/GSL https://msdn.microsoft.com/en-us/library/mt7628…
comment by corysama · 2017-03-28 · in It’s time for a memory safety intervention