4 ms·
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,
by nly 6y ago
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":
https://www.youtube.com/watch?v=YnWhqhNdYyk https://www.youtube.com/watch?v=YnWhqhNdYyk
- jart 6y agoOne of her slides was titled "Stop teaching pointers!" too. My VP back at my old job snapped at me once because I got too excited about the pointer abstractions provided by modern C++. Ever since that day I try to take a more rational approach to writing native code where I consider what it looks like in binary and I've configured my Emacs so it can do what clang.godbolt.org does in a single keystroke.
- nly 6y agoFor the record, she's not really saying people shouldn't learn this low level stuff... just that 'intro to C++' shouldn't be teaching this stuff first The biggest problem with C++ in industry is that people tend to write "C/C++" when it deserves to be recognized as a language in its own right.
- jart 6y agoOne does not simply introduce C++. It's the most insanely hardcore language there is. I wouldn't have stood any chance understanding it had it not been for my gentle introduction with C for several years.
- SAI_Peregrinus 6y agoC++ makes Rust look easy to learn.
- pjmlp 6y agoReally? Apparently the first year students at my university didn't had any issue going from Standard Pascal to C++, in the mid-90's. Proper C++ was taught using our string, vector and collection classes, given that we were still a couple of years away from ISO C++ being fully defined. C style programming with low level tricks were only introduced later as advanced topics. Apparently thousands of students managed to get going the remaining 5 years of the degree.
- BenjiWiebe 6y agoC++ in the mid 90s was a lot simpler than C++ now.
- pjmlp 6y agoNo one obliges you to write C++20 with SFINAE template meta-programming, using classes with CTAD constructors. Just like no Python newbie is able to master Python 3.9 full language set, standard library, numpy, pandas, django,...
- jart 6y agoWell there's a reason universities switched to Java when teaching algorithms and containers after the 90's. C++ is a weaker abstraction that encourages the kind of curiosity that's going to cause a student's brain to melt the moment they try to figure out how things work and encounter the sorts of demons the coursework hasn't prepared them to face. If I was going to teach it, I'd start with octal machine codes and work my way up. https://justine.lol/blinkenlights/realmode.html https://justine.lol/blinkenlights/realmode.html Sort of like if I were to teach TypeScript then I'd start with JavaScript. My approach to native development probably has more in common with web development than it does with modern c++ practices to be honest, and that's something I talk about in one of my famous hacks: https://github.com/jart/cosmopolitan/blob/4577f7fe11e5d8ef0a50ffeac438f1235b5265b3/ape/ape.lds#L119-L121 https://github.com/jart/cosmopolitan/blob/4577f7fe11e5d8ef0a...
- pjmlp 6y agoUS universities maybe, there isn't much Java on my former university learning plan. The only subjects that went full into Java were distributed computing and compiler design. And during the last 20 years they already went back into their decision. I should note that languages like Prolog, ML and Smalltalk were part of the learning subjects as well. Assembly was part of electronic subjects where design of a pseudo CPU was also part of the themes. So we had our own pseudo Assembly, x86 and MIPS.
- ta988 6y agoYes this is the curse of knowledge, people that know c++ by their exposure to it for decades are usually unable to bring any new comer to it.