My sister is a substitute teacher, not in the US, who has to teach a learn to program class and apparently the options are either C++ or pseudocode.<p>What would you choose and why?
Disclaimer: I've never taught a class, so don't put too much weight on my speculation on how students would react. On the other hand, actual educators are replacing lisp with python [1], so I don't think they can be trusted...<p>The C subset of C++, with a few quality of life exceptions - no need to torture the students with printf codes when there's std::cout. It will teach the fundamentals of how computers work, without any hidden magic.<p>Pseudocode is a good starting point for a programming task, especially when teaching, to convey the high-level solution without the added confusion of unfamiliar programming syntax, but it alone is, in my lay opinion, insufficient. Without seeing any results it might be hard to keep students interested, and it won't uncover any mistakes in thinking, won't teach the rigorous attention to detail needed to create a working program. E.g. using <= instead of <, or off by 1 errors, or any number of other bugs. Like it or not, learning to deal with such 'trivial' details is a big part of programming.<p>I say the C subset only because virtual functions, templates, inheritance, polymorphism, and destructors are a bit much for beginners still coming to grips with the basics. But in principle, once they understand how it works behind the scenes, I don't see the harm in using standard containers and other niceties.<p>[1] <a href="https://news.ycombinator.com/item?id=14167453" rel="nofollow">https://news.ycombinator.com/item?id=14167453</a>
If they're really the only two options, I'd use C++: code that cannot be actually compiled and executed isn't code at all. You can write pseudo-code all day, and learn very little. It's fundamental that programmers grasp that the machine has no common sense, is absolutely literal, and that instructing one to get it to do what you want is unlike anything you've done before.
That's puzzling to me, there are much better options imo. Between the two I would choose C++ though. The fun and purpose of code is running it, seeing the thing you wrote "come to life" is pretty essential imo, pseudocode sounds boring.<p>If not limited to the options mentioned I would go with Javascript.<p>It's easy to learn and covers the basics, while also having a common syntax similar to many other languages. No setup or installing needed, you just need a browser that everyone already has, it's very accessible. It's also probably the easiest way to get some UI and make something that can be used, being able to introduce buttons and inputs is great for getting people excited.<p>Otherwise I would go with Python. Maybe a bit more setup, but similar to JS in how quick you can get to results.
Agreed with others: if it's really those two, C++ it is. Not the best choice, but for an intro thing you can tie down the subset of the language you use and ignore a lot of the messy bits.