Skip to content
HHackerTube.videoSurprise me

CppCon 2015: Kate Gregory “Stop Teaching C"

CppCon 2015: Kate Gregory “Stop Teaching C" on HackerTube: recommended by 7 Hacker News commenters across 7 separate months, 2016–2025.

CppCon

talk · intermediate · evergreen

Open on YouTube

Kate Gregory argues at CppCon 2015 that C++ should be taught without starting from C: no char* strings, printf or raw arrays at first, with references before pointers.

Why Hacker News recommends it

HN people cite it constantly in C versus C++ debates as the case for teaching modern C++ idioms rather than C first.

people recommended it
7
separate months
7
strong recommendations
3
discussed on HN
2016–2025
“Not only is she a great presenter, but she makes amazing points about what is fundamentally wrong with how C++ is taught in classrooms around the globe.”
— autoreleasepool, Jan 2016, in “The Landscape of Parallelism in C++ [video]”

What HN commenters said

18 Hacker News comments link this video. Each one links back to its thread.

tialaramexApr 2022Strongly recommends

If what you need is C++ (which IMNSHO it is not) then starting with C is a bad idea. Here's Kate Gregory's talk, you should definitely listen to her even if you think I'm an idiot because she actually teaches people C++ and I (thankfully) do not. ▶ this video Now here's my rant, which is unrelated to Kate's very smart talk: C has an excuse, because it was written in the 1970s for the PDP-11. In the 1970s struct qualifies as a fancy new feature. In the 1970s a wide pointer is very expensive. In the 1970s a linked list is often a good choice of data structure. C++ comes along quite a lot later. These things are already untrue or fast becoming untrue, but rather than risk being unpopular Bjarne's language just cargo cults C. It is almost all of C, plus more... stuff. C++ does not fix any of the worst problems with C, because doing so would risk losing compatibility and hurt Bjarne's adoption story. As a result, with only a handful of exceptions all of that broken garbage is still there . C++ still has the almost useless built-in array type from C, it keeps weird syntax from C that was too hard to ban in the 1970s compiler but you should never use, its built-in types have the same stupid, confusing names like "long" and "double", it has this awful "macro pre-processor" which makes even trivial tooling problems very difficult and set back software quality by at least a decade. Kate's approach avoids teaching beginners about most of this. It's still there, which is bad, but at least you

in “C++20 Ranges Algorithms – Non-Modifying Operations” · View on HN

e12eMay 2016Strongly recommends

I've been spending a few days going through talks from last years cppcon[1]. They're all good, but they've all left me with a strong desire for a strongly opinionated, there-is-no-past-only-the-future introduction to C++14 (and incidentally, C11). I've added a few of those talks I've watched and liked to a small playlist (with a couple of other talks on programming, unrelated - the relevant talks are prefixed with "cppcon 2015"): [link] The full cppcon playlist is here: [link] Of special relevance is the rather excellent talk by Kate Gregory on "Stop Teaching C" (when you're supposed to do an intro course to C++): "CppCon 2015: Kate Gregory “Stop Teaching C"": ▶ this video (But again, I want an open wiki/live tutorial, along the lines of "How I start", but longer, which goes through all this stuff. We really should make one, both for C++14 and for C11). CppCon 2015: Herb Sutter "Writing Good C++14... By Default": [link] Is also rather uplifting, and: CppCon 2015: Sean Parent "Better Code: Data Structures": [link] makes a pretty good case for simple, modern C++ being clear, easy and efficient. Finally, CppCon 2015: Phil Nash “Test Driven C++ with Catch”: [link] apart for being a pretty straight forward intro to a simple testing framework, appears to reveal some secrets combining template magic and still get sane compile times (hint: don't recompile more (template) code on every iteration than you need to). There's a couple of good ones that touch on meta-programming too (Look for t

in “Why I don't spend time with Modern C++ anymore” · View on HN

autoreleasepoolJan 2016Strongly recommends

> It's as if you had to be there from the start to have a full image of how the language grew and truly understand the interplay between all the "features", otherwise it's too late to become an expert, and in some cases even too late to become comfortable writing good maintainable code in C++. This is funny to me (not in a condescending way) because I had the exact opposite thought today. I actually came back to C++ on my own fairly recently after learning about the modern version of the language. I was lamenting about how lucky I was to have started learning with C++14 because I didn't have to go through the horrible C++98 and C++03 eras. In fact I could simply ignore most of it. It's all about diving straight into the modern stuff. The biggest problem with learning C++ is that most textbooks, classes, university courses don't actually teach you the real C++ parts until the last 4 weeks of the courses. Instead they teach you "C with classes.. and std::cout". This has been acknowledged as an problem by some of the more prominent members of the committee. I urge you to watch Kate Gregory's talk from cppcon 2015 "Stop Teaching C". ▶ this video Not only is she a great presenter, but she makes amazing points about what is fundamentally wrong with how C++ is taught in classrooms around the globe. I really hope her talk makes some impact. I know I used to hate the language. That was when I was writing it for my university that for some reason didn't want to upgrade their 2007 gcc compil

in “The Landscape of Parallelism in C++ [video]” · View on HN

tediousdemiseApr 2021Recommends

I just can’t recommend using it for new code in light of the sexy new alternatives that can compile down to the same binary with source code that’s way more intuitive and readable. I do have nostalgia for C since it was my first language, and I think a lot of people are in the same boat, which is a problem. That’s why I think we need to stop teaching C. Kate Gregory has a good cppcon talk on the topic: ▶ this video

in “A simple C implementation to stream H.264 to browser using WebRTC” · View on HN

simiasOct 2018Recommends

My point was that I don't think Smalltalk was ever more popular in the industry than C regardless of the time frame. By the mid 90's lisp machines were pretty long gone, betting on Lisp instead of C if employability is the metric seems rather bold. MIPS I concede, it was remained fairly popular for a long time. I guess my overall point is that the subjective choices made by this university back then don't really mean much by now. The fact that they taught Pascal instead of C alone proves that they weren't particularly prescient. >Regarding language comparisons, actually C++ is Italian and C Latin. I thought about that while writing this bad analogy but I couldn't come up with a better one. I wasn't really talking about the historical relationship between C and C++ but rather about their relative complexities. Learning C++ is vastly more complicated than learning C. On top of that the coding style of a modern C++ application (which generally involves a lot of metaprogramming, OOP and even some functional constructs) is fairly different from a standard C codebase. You don't write C like you write C++ and vice-versa. There's this good talk about how we should "stop teaching C" (if we want to teach C++): ▶ this video I think the opposite holds true as well for very much the same reasons.

in “Teaching C (2016)” · View on HN

pjmlpMar 2018Recommends

- 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" - ▶ this video "10 Core Guidelines You Need to Start Using Now" - [link] "It's Complicated" - [link]

in “Ask HN: Best way to learn modern C++?” · View on HN

Show 12 more comments
pjmlpMay 2017Recommends

First of all, and most important one, learn C++ idioms, not C. This means making use of library types for memory allocation, vectors and strings. There is a place for old C style low level features, but those should come later, after the safer concepts are already ingrained. Kate Gregory's “Stop Teaching C" talk at CppCon 2015 explains better than me. ▶ this video Get a nice IDE, QtCreator, Clion, VC++ Community, KDevelop, XCode. Besides the "Tour of C++", check Stephan T. Lavavej talks at Channel 9. "Core C++ Lectures" [link] "Advanced STL", these ones only when you already have a good understanding of STL as user [link] Also check video presentations from NDC, ACCU, CppCon, CppNow and C9 Going Native.

in “Coroutines are now in Clang trunk, libc++” · View on HN

daeminJan 2016Recommends

For Modern C++ I found this video ▶ this video interesting in regards to the topics she chooses to teach people new to C++.

in “} // good to go” · View on HN

pjmlpMar 2025Cites it

Since at least C++14, no one should be learning C as means to learn C++, unless they want to keep writing security exploits on regular basis. CppCon 2015: “Stop Teaching C" ▶ this video

in “Zig's dot star syntax (value.*)” · View on HN

gattrMar 2022Cites it

Somewhat related: [1]. A bit provocative title, but it's actually about "teaching (the newcomers) C++ constructs first before going through C-era ones". [1] CppCon 2015: Kate Gregory “Stop Teaching C" ( ▶ this video )

in “Learning Standard C++ as a New Language (1999)” · View on HN

phendrenad2Feb 2022Cites it

I wonder if the reason for there being no C language conference is: It's generally accepted that C is "dead" or should become dead. In fact at C++ conferences you will see many anti-C talks: * ▶ this video And also talks promoting proselytizing to C programmers and bringing them to C++: * [link] And of course, now, Rust is supposed to supplant C.

in “The Problem with C (2020)” · View on HN

pjmlpJul 2021Cites it

Everything that implies taking sides is politics, no matter what. You haven't seen any drama, really? [link] C vs C++ flame wars have been a thing since C++ was born at AT&T. Since you aren't following up the news, "CppCon 2015: Kate Gregory “Stop Teaching C" ▶ this video "We stopped teaching C" [link] You can find similar stuff from C side, specially if you back in time to GNOME mailing lists, Usenet archives from comp.lang,languagex

in “Using IceWM and a Raspberry Pi as my main PC, sharing my theme, config and some” · View on HN

nlyMay 2021Cites it

For sure, it's a good way to teach that C is insufficient to deal with even the simplest of tasks. Unfortunately teaching has a bad habit of becoming practice, no matter how good the intention. With regard to teaching C++ specifically I tend to agree with this talk: CppCon 2015 - Kate Gregory “Stop Teaching C": ▶ this video

in “The Byte Order Fiasco” · View on HN

pjmlpMay 2020Cites it

Why you see them? Because developers should know better, but there is a community that keeps writing C style code in C++, unfortunately, as their teachers are stuck in the 90's. "CppCon 2015: Kate Gregory “Stop Teaching C" ▶ this video But what to expect when schools keep using Turbo C++ as teaching tool, [link]

in “OCaml is Pretty Great (2019)” · View on HN

pjmlpSep 2018Cites it

True, but you have missed the part that makes C++ safer than C. - User defined types with invariants - templates, const, constexpr and if constexpr instead of macros - proper string types - proper vector types - type safe enumerations - many implicit conversions in C are compiler errors in C++ - RAII - contracts - generic data structures The iterator invalidation is easy to find out in compilers like Visual C++, their STL implementation can be customized to validate iterator invariants. The danging pointers, use-after-free, use-after-move mentioned by you are the purpose of this proposal. I was an early C++ adopter in 1992, LLVM rejuvenated language research in 2003, DirectX and Metal shaders are a C++ dialect, AUTOSAR has migrated from C to C++14 only two years ago, NVidia GPUs since Volta (2017) are now being designed to run C++ code efficiently. A time frame of about 30 years for C++ to become widespread as it is. I am all for Rust or similar language to replace C++ and do away with C copy-paste culture, but I am not throwing away all my code just because. So yeah, it isn't perfect, but it surely is way better than plain C coding and the community does try to promote not doing C in C++. CppCon 2015: Kate Gregory “Stop Teaching C" ▶ this video

in “C++ Lifetime profile v1.0 posted” · View on HN

pjmlpFeb 2018Cites it

C should never be learned on the path of being a good, programming safe conscious C++ programmer. CppCon 2015: Kate Gregory “Stop Teaching C" ▶ this video

in “Why hasn't D started to replace C++” · View on HN

pjmlpFeb 2018Cites it

The major issue with C++, is what also helped the language gain market adoption, copy-paste compatibility with most of C89 code. So security conscious C++ developers tend to use enum class , string, vector and array classes, RAII, iostreams, wrapping data access in classes with invariants,... Developers with more C oriented mindset, tend to just code away like "C with C++ compiler" programming style. Hence the need being discussing since the last three CppCon, to stop using C style programming in modern C++. CppCon 2015: Kate Gregory “Stop Teaching C" - ▶ this video CppCon 2015: Bjarne Stroustrup “Writing Good C++14” - [link] CppCon 2017: Bjarne Stroustrup “Learning and Teaching Modern C++” - [link] Of course, preventing copy-paste compatibility with C, already solves many of those issues from the get go.

in “Rust things I miss in C” · View on HN

pjmlpNov 2016Cites it

That is the path to write unsafe and unidiomatic C++. CppCon 2015: Kate Gregory “Stop Teaching C" ▶ this video

in “C for Python programmers (2011)” · View on HN

Topics & tags

C, C++, Rust, Go & systems languagesEducation & learningc++modern c++pedagogycppconkate gregory