system(), looping on
eofto read files, etc.
system("cls")to clear the console, and instead introduce cross-platform albeit more complex alternatives right from the get-go?
|We want our C++ programs to be easy to write, correct, maintainable, and acceptably efficient. To do that, we must design and program at a higher level of abstraction than has typically been done with C and early C++. Through the use of libraries, this ideal is achievable without loss of efficiency compared to lower level styles. ...|
Education must play a major role in this move to cleaner and higher-level programming styles. The C++ community doesn’t need another generation of programmers who by default use the lowest level of language and library facilities available out of misplaced fear of inefficiencies. Experienced C++ programmers as well as C++ novices must learn to use Standard C++ as a new and higher-level language as a matter of course and descend to lower levels of abstraction only where absolutely necessary.
Stroustrup in 'Learning Standard C++ as a New Language'
|Our approach is possible only because C++, and our understanding of it, has had time to mature. That maturity has let us ignore many of the low-level ideas that were the mainstay of earlier C++ programs and programmers.|
The ability to ignore details is characteristic of maturing technologies. For example, early automobiles broke down so often that every driver had to be an amateur mechanic. It would have been foolhardy to go for a drive without knowing how to get back home even if something went wrong. Today's drivers don't need detailed engineering knowledge in order to use a car for transportation. They may wish to learn the engineering details for other reasons, but that's another story entirely.
We define abstraction as selective ignorance--concentrating on the ideas that are relevant to the task at hand, and ignoring everything else--and we think that it is the most important idea in modern programming. The key to writing a successful program is knowing which parts of the problem to take into account, and which parts to ignore. Every programming langauge offers tools for creating useful abstractions, and every successful programmer knows how to use those tools.
If abstractions are well designed and well chosen, we believe that we can use them even if we don't understand all the details of how they work.
Koenig and Moo in 'Accelerated C++: Practical Programming by Example'
|We are reviewing our philosophy in some detail in the hope that others interested in teaching—or learning—C++ can understand the motivation behind our approach and consider adopting it themselves.|
Three principles underlie our approach:
. Explain how to use language or library facilities before explaining how they work.
. Motivate each facility with a problem that uses that facility as an integral part of its solution. The problem must be interesting in its own right, and not merely constructed to demonstrate the facility.
. Present the most useful ideas first.
Our strategy so far has led us to describe three fundamental standard-library facilities— vector , string , and struct —before even mentioning built-in arrays or pointers. In doing so, we have shown how to write substantial programs.
Koenig and Moo in 'Rethinking How to Teach C++ Part 4: Emphasizing the Library'
|No. Teach people that they don't need to clear the console.|
|we're programmers, of course we need to.|
|Do you think a tutorial series taught from the ground up in "pure" and modern (C++11, C++14) would spawn a "generation" of better programmers, or would it backfire and scare people away?|
|I'd just like to hear some feedback about what "parts" of the language you folks think shouldn't be taught or emphasized|
|Do we need seemingly archaic (and sometimes wrong) methods of teaching to keep things simple and intuitive?|
|For example, would it make sense to omit even mentioning system("cls") to clear the console, and instead introduce cross-platform albeit more complex alternatives right from the get-go?|
|I don't want to discourage you... the project you are thinking of is much larger than most people realize.|
|Teach people that they don't need to clear the console.|