CppCon 2017: Kate Gregory “10 Core Guidelines You Need to Start Using Now”

CppCon · 143K views · 2017 · 1:02:33

Open on YouTube

C, C++, Rust, Go & systems languagestalk

Why Hacker News recommends it

Recommended as the condensed tl;dr of the C++ Core Guidelines and as a route into modern C++.

What it is

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 by 2 HN commenters across 1 different months, 2017 to 2019.

What Hacker News said

Recommends pjmlp · 2018-03 · on “Ask HN: Best way to learn modern C++?”

- 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]

Recommends boltzmannbrain · 2018-03 · on “C++ Core Guidelines”

I recommend the tl;dr version from Kate Gregory at CppCon 2017, “10 Core Guidelines You Need to Start Using Now”: [this video]

Cites pjmlp · 2017-11 · on “Carp, a compiled Lisp with type inference and a borrow checker”

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 Def

Cites wyldfire · 2019-07 · on “Catching use-after-move C++ bugs with Clang's consumed annotations”

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 -Wlifetim