osmium said:
As far as I am concerned the jury is still out on what the teaching sequence
should be. It is far from clear to me that the 'magical' part should come
first. I guess one of my biggest problems is that it is hard to motivate
the student to learn the "old ways" when he has already learned the modern
way;
I have worked with people who learned the low-level parts of C++
first, and people who learned the high-level parts first. With
a few exceptions, the latter tend to be better programmers. For me,
for C++, the jury is closed. I learned the low-level stuff
first, and I used to believe that was the best way, but working
with people who didn't has changed my mind. I do agree that
students should learn how to implement all the basic data
structures, preferably movitated by an example of where a
hand-rolled tool can do better than the standard library. (This
would require some care in designing the assignment, but I think
which I suspect is often horribly inefficient.
Stop suspecting and measure. If you measure, you'll have some idea of
when the standard library is better, and when it's better to write
your own, or use an alternative. If you don't measure, you can't
make any large program efficient anyway.
In my experience the performance effect of the STL is to save lots of
time when one is writing the 90% of code that takes up 10% of the
time, which leaves one with more time to implemented optimized
special purposed data structures and algorithms for the 10% of
code that takes up 90% of time.
Of course, the last few places I worked, we treated the compiler like
that too; several performance crucial areas were re-written in
hand-optimized assembler. And the difference between
hand-optimized assembler, and compiler-generated, is *a lot*
bigger than the difference between the STL and hand-optimzed data
structures.
(Note: string, and iostream, which are part of the standard library
but not part of the STL, are usually implemented in a manner that
is inefficient for many (but not all) common operations.)
Why learn hash tables
when there is "push_back" or whatever?
I'm sorry, I don't understand your reference. SGI hash_map, hash_set,
do not support push_back .
Having said that, I am still a bit disturbed that the OPs school seems to
have a considerable lag on the learning curve. It almost seems that they
are contemptuous of the students to use that old compiler for the course he
describes. As though they can't be bothered with trivia.
Agreed.
I wonder if the English course work in the same school is expected
in Word Star format?