|
My question maybe due to the filtered perception I have from the types of questions being asked in the C/C++ forum where beginning programming students are dealing with arrays, pointers, and linked lists. Perhaps there is hope that C++ is being taught in a much better format now rather than just translating the K&R C book into C++ and then tacking on how to use classes afterwards. What's the best way to teach C++?
|
|
|
|
|
I completely disagree with teaching classes right from the start. Teach OOP after the students learn the fundamentals. For one thing they'll appreciate it more.
|
|
|
|
|
I tend to think OOP -is- a fundamental. To me, its a basic way of thinking about how to structure software, not a feature you add on to code later. I think there's value in learning to think about problems in an OOP fashion right from the start.
|
|
|
|
|
No, your thinking of OOD. OOD is structure and OOP is the nity grity details.
|
|
|
|
|
I find it to be an iterative process and the two feed each other. I wouldn't view OOP as just an implementation detail or language feature myself.
|
|
|
|
|
I would say it is really hard to determine how to teach a language and rich as C++. There is so much to understand, and it takes a long while for the concepts behind subjects like OOD, and Design Patterns to be understood well enough. You have to start some place and not push so much information onto the student that they get lost. It is good to introduce concepts early, but it should not be expected that beginning programers will understand them. Maybe as the course proceeds there can be an aside on why it might be a good idea to use some concept to improve the design, but don't expect many of the students to adequately grasp the concepts initially. This is sort of like reproducing the one-room school house which actually is much more effective than the traditional training approach.
|
|
|
|
|
I've not done any C++ for years but I take an interest every now and then to see what's going on. Aren't there a few beginner C++ books around that teach "modern C++?" Doesn't Stroustrup have one or is that just a course?
Anyway, I gather Stroustrup himself says you should start with the high-level[^] (not necessarily OO but high-level procedural) and then move to the lower level as required. But many C++ devs disagree with Stroustrup.
Kevin
|
|
|
|
|
People get confused :
C++ != OOP
C++ is a multi-paradigm language, it does not only do OOP it can do a lot of good declarative programming.
Nihil obstat
|
|
|
|
|
Maximilien wrote: it can do a lot of good declarative programming
Do you mean imperative programming?
|
|
|
|
|
Like this[^]. Teaches problem solving via C++.
|
|
|
|