Hacker GitHub

← All repos

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

Mentions per year 100 mentions · busiest year 2015 (21)
20082026
  1. …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”
  2. …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…
  3. …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…
  4. …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…
  5. …[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?
  6. …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
  7. …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)
  8. …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...
  9. …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…
  10. https://github.com/isocpp/CppCoreGuidelines
  11. 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
  12. …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
  13. …Modern C++ mostly guarantees against leaks since it encourages the stack as much possible. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  14. …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
  15. 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
  16. …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.
  17. Here is an example from a leading exponent of the commitee, ironically also from Microsoft: https://github.com/isocpp/CppCoreGuidelines/blob/master/docs...
  18. E.g. https://github.com/isocpp/CppCoreGuidelines/blob/master/docs...
  19. There are the Core Guidelines : https://github.com/isocpp/CppCoreGuidelines .
  20. …"C++ Core Guidelines", which, like the language itself, are a couple of orders of magnitude larger: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  21. …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.
  22. Unfortunately C++ created new problems like https://github.com/isocpp/CppCoreGuidelines/issues/1038 . Lambdas in particular are a minefield.
  23. 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
  24. …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...
  25. …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++
  26. …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
  27. …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]…
  28. …in C++, and personally I prefer using it, together with -Wshadow to catch possible issues. 0: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  29. …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
  30. 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?
  31. …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…
  32. > Maybe if they started defining a 'modern c++' subset... Here it is: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  33. Like C++ Core Guidelines? https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  34. …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…
  35. …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?
  36. …want more specifics and detail, the CppCoreGuidelines have a section on when to use which string. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  37. The guidelines seem like a document to me: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
  38. 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
  39. …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
  40. …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
  41. 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++?
  42. 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++?
  43. …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…
  44. 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
  45. …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
  46. 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
  47. …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...
  48. …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)
  49. …handles to be opened before use and automatically closed when leaving scope (no longer in use). See https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
    comment by Too · 2017-04-01 · in Idris 1.0
  50. …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…