CppCon 2015: Kate Gregory “Stop Teaching C"
CppCon7 HN recommenders · recommended in 7 months, 2016–2025
talk · intermediate · evergreen · 2016–2025 on HN
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.
HN people cite it constantly in C versus C++ debates as the case for teaching modern C++ idioms rather than C first.
Up next
5 mo on HNCppCon 2015: Herb Sutter "Writing Good C++14... By Default"
CppCon
4 HN recommender · 2015–2018
3 mo on HNCppCon 2015: Sean Parent "Better Code: Data Structures"
CppCon
3 HN recommender · 2016–2021
6 mo on HN7 Habits For Effective Text Editing 2.0
GoogleTalksArchive
5 HN recommender · 2013–2023
2 mo on HN7 Habits For Effective Text Editing 2.0
Google
2 HN recommender · 2012–2023
1 mo on HNBhopal Disaster - BBC - The Yes Men
razorfoundation
1 HN recommend · 2010–2022
7 mo on HNRichard Feynman Computer Science Lecture - Hardware, Software and Heuristics
Muon Ray
8 HN recommender · 2013–2026
10 mo on HNGrowing a Language, by Guy Steele
Bill Pugh
11 HN recommender · 2014–2026
8 mo on HNJulia: to Lisp or not to Lisp?
European Lisp Symposium
4 HN recommender · 2016–2022
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
12 comments from Hacker News
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
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
> 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
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
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.
- 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
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.
For Modern C++ I found this video ▶ this video interesting in regards to the topics she chooses to teach people new to C++.
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
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 )
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.
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