3 ms·
C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive. Python is easy to us
by techman9 9y ago
C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive. Python is easy to use and be productive with out of the box, has a complete feature set, doesn't require manual memory management and has far more expressive errors.
It really depends on the emphasis of an intro programming course. If the goal is to cover the basic control structures of a higher level language (conditionals, loops, switch statements, functions) and the fundamentals of object oriented programming, and get into some basic algorithms and data structures, then Python probably has less baggage and is more terse and expressive than something like C++.
- epmaybe 9y agoIt almost feels as if more universities should have two different "introductory" CS courses: one for non-majors, and another for majors. I would however express that in my CS curriculum (only 6 years ago) we did not start using C++ until my junior/senior year, and instead stuck with Java.
- techman9 9y agoI'm not sure about segmenting intro courses by majors, but there is good research that suggests that segmenting CS1 by level of background knowledge has a significant positive impact on future coursework [0]. I suspect that a larger proportion of students who eventually study CS have a higher degree of background knowledge as well, so this probably makes sense. [0] https://dl.acm.org/citation.cfm?id=2445248 https://dl.acm.org/citation.cfm?id=2445248, https://dl.acm.org/citation.cfm?id=2255982 https://dl.acm.org/citation.cfm?id=2255982
- 52-6F-62 9y ago>C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive. For that reason I'm surprised by the lack of enthusiasm for just starting students in C. By university, I imagine most students have already spent some time noodling around enough to understand some basic paradigms. C does not have the barrier that C++ has in that way. It's so much smaller, which is great, and no less useful. Soon after learning the basics a student may want to jump to something else, but then they'd be fully equipped. Not that I'm against the Python approach— but for somebody looking for a deeper understanding C seems like a good choice since you can either drill down into memory management, or (as long as you don't do anything drastic) be somewhat lazy about it (with modern computers). Python— I agree with many people in the thread—is very suitable for non-majors or a more applied approach. I am consistently trying to encourage non-programmer friends, family, others to take a stab at it because of the increase in productivity or ability it gives them with their machine they use on a daily basis. ... To the other questions— how much do you really need to know to be considered a CS? Surely you could pare it down to theoretical physics if you wanted to and eventually end at some unanswered questions somewhere between electron behaviour and quantum physics, no? Then you're a computer scientist. Kidding aside and perhaps off topic—but much of the discussion in this thread causes me to wonder why so many interviews surround the ability to re-implement common (stdlib) algorithms, or on the web-side polyfills for existing language features, rather than understand some basics about how memory works from a programming perspective.
- farresito 9y agoYou have a great standard library; you don't need manual memory management, because this is an introductory course; the error messages are admittedly bad, but not that terrible if you are not using templates. I'm not particularly fond of C++, but if you intend to teach the basics of programming and data structures, it's a decent language.