[Edu-sig] Hello from a CS Teacher

Tim Peters tim_one@email.msn.com
Sat, 12 Feb 2000 15:19:03 -0500

[Jeffrey Elkner]
> ...
> C++ is a TERRIBLE language for CP4E!

I'd say it's a terrible *first* (even second) language for any purpose
whatsoever:  its artificial complexities, both syntactic and semantic, are
staggering.  They exist for good reasons, but those have to do with
maintaining compatibility with C, and with squeezing the very last drop of
"performance" out of the machine.  In some contexts, those are crucial
(e.g., I work in commercial speech recognition, which pushes the limits of
what PC HW can do, and the combo of C++ and hand-optimized assembler is our
only realistic choice today).  But for a newbie?  Yuck.  Bad, bad idea.

> ...
> The AP course is aimed at future CS majors.

Eiffel would be a vastly better choice for them if OO is in vogue; else
Scheme or Haskell.  All three took extreme care to get "everything exactly
right" from a theoretical POV, and CS majors need that (especially if
they're going on to graduate studies).

> I want our first year course to reach way beyond that limited
> population.  I have been arguing to anyone who will listen that
> Python is the language of choice for someone who wants to use
> programming as a tool but not necessarily as a career.

Yes, Python excels at "getting stuff done, and quickly".  This is also
important for people who program for a living, and Python remains the most
generally *useful* language in my professional toolkit.  You couldn't regret
teaching Python to anyone, as it's something they'll actually use the rest
of their lives, no matter what direction they take.

Invite your board to read comp.lang.python for a while:  it's the most
eclectic lang group on Usenet, from "theory heads" debating the fine points
of continuations, thru parents teaching their kids how to write a database
to keep track of Beanie Baby collections, to professional programmers on the
bleeding edge of new web apps.  Then study comp.lang.{eiffel, scheme, c++,
...}.  The Python community is the very antithesis of a cult <wink>.

> We now have a second year course for students who want more programming
> but not on the AP track.  Many of these students will be learning
> more Python in year 2.  For those students who do want to major in
> computer science and who do plan on taking the AP exam, the ought to
> learn more than one language anyway.


> C++ will be a good learning experience for them,

The complexities of C++ are best left to professional programmers; for a CS
major, the best lesson to learn from C++ may be how painful "backward
compatibility" and "speed at any cost" can become.  But you could teach that
in one lesson, by putting up lots of examples of incomprehensibly obscure
C++ and laughing a lot <wink>.

> made better by the fact that they will already have a high level
> understanding of modern programming concepts through
> their experience with Python ;-)

There is a rational subset of C++ that corresponds to what comes naturally
in Python -- add "virtual" to everything and avoid some of the C++ features
Stroustrup himself regrets adding (like the "protected" keyword).  Much of
C++'s OO story is artificially strained due to the desire to make a C++
class the same (by default) as a C struct.  So you have to go out of your
way to add "noise words" to C++ to get it to act the way every other OO
language acts by default.  The part of C++ that "makes good OO sense" is
largely the part they will have picked up without artificial strain from
Python.  I think that's a long-winded way of agreeing with you here.

if-c++-is-the-answer-the-question-is-not-newbie-material-ly y'rs
    - tim