CppCon 2017: Kate Gregory “10 Core Guidelines You Need to Start Using Now”
CppCon2 HN recommenders · recommended in 1 month, 2017–2019
talk · intermediate · evergreen · 2017–2019 on HN
Kate Gregory's CppCon 2017 talk picks ten highlights from the C++ Core Guidelines and shows examples and benefits for each. It is aimed at C++ developers of any experience level who have not read the full guidelines.
Recommended as the condensed tl;dr of the C++ Core Guidelines and as a route into modern C++.
Up next
6 mo on HNCppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”
CppCon
5 HN recommender · 2017–2025
2 mo on HNCppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"
CppCon
2 HN recommender · 2014–2021
7 mo on HNCppCon 2015: Kate Gregory “Stop Teaching C"
CppCon
7 HN recommender · 2016–2025
4 mo on HNEdwin Brady - Idris 2 - Type-driven Development of Idris
Curry On!
4 HN recommender · 2019–2023
5 mo on HNEric Bier Demonstrates Cedar
Computer History Museum
3 HN recommender · 2020–2025
4 mo on HNCppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”
CppCon
2 HN recommender · 2016–2025
3 mo on HNCppCon 2016: Dan Saks “extern c: Talking to C Programmers about C++”
CppCon
2 HN recommender · 2017–2025
4 mo on HN"A Political History of X" - Keith Packard (LCA 2020)
linux.conf.au
4 HN recommender · 2020–2025
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
10 mo on HNCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
9 HN recommender · 2018–2026
9 mo on HNRustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West
Rust Programming Language
9 HN recommender · 2018–2023
4 comments from Hacker News
- Tour of C++ ( link ) - Principles and Practice Using C++ ( link ) - From Mathematics to Generic Programming ( link ) - The Scott Meyers books Some of the Bjarne Stroustrup videos, "Learning and Teaching Modern C++" - link Some of the Herb Sutter videos, "Writing Good C++14... By Default" - link "Back to the Basics! Essentials of Modern C++ Style" - link Some of the Kate Gregory videos, "Stop Teaching C" - link "10 Core Guidelines You Need to Start Using Now" - ▶ this video "It's Complicated" - link
I recommend the tl;dr version from Kate Gregory at CppCon 2017, “10 Core Guidelines You Need to Start Using Now”: ▶ this video
In fact, Sutter (et al) are working on lifetimes in CppCoreGuidelines [1]. I built their clang tree and tried it out without bothering to RTFM and tried out the warning on a pile of C++ code. I naively assumed that it might be a generally-useful warning ("-Wlifetime") that's not ready to be introduced upstream. That's not the case AFAICT. What I suppose I would've learned from RTFM is that the profile specified by the guidelines is sorta like an opt-in 'dialect' to annotate/specify lifetime information. Without it, there's lots of spurious findings. Either that, or the codebase I tried it on isn't as good as I thought it was. Here's a couple of interesting examples of failure modes -Wlifetime can detect on godbolt[2][3]. I watched a video [5] a while back on the Guidelines Support Library (GSL) [4] and it seemed like a really interesting concept. I think it's a valuable idea and I'd love to see popular C++ projects leveraging it. I'm a card-carrying RESF member† (but have a day job w/mostly C++). Don't RIIR for one thing, RIIR to get all the things. Cargo is the sleeper hit of Rust. Hygienic macros and more! [1] link [2] link [3] link [4] link [5] CppCon 2017: Kate Gregory “10 Core Guidelines You Need to Start Using Now” ▶ this video † Rust Evangelism Strike Force -- maybe we really should have cards
No, GSL is a kind of stop-gap solution, until standard catches on. For example std::string_view and ongoing design on std::array_view are based on gsl::span . The gsl::byte is also no longer needed on C++17 thanks to std::byte as yet another example. The GSL asserts are there until code contracts[0] get into the standard. The magical types like gsl::owner allow clang-tidy and VC++ checkers to apply a Rust-like memory tracking usage. Kate Gregory did a presentation at CppCon 2017. "10 Core Guidelines You Need to Start Using Now" ▶ this video As for not taking off, being initially a Microsoft proposal, it is surely used by Office and Windows teams, specially given they already use SDL (Security Definition Language) macros as well. [0] link