[Edu-sig] Python for Algorithms and Data Structures...

Kirby Urner urnerk@qwest.net
Fri, 23 Aug 2002 08:02:52 -0700


Is this a course for computer science majors?  If it is, then I don't
think one can get away with purely Python for the whole curriculum,
even if it's the most used in particular courses, nor should one.
You likely agree.

People getting deeply into programming as an area of specialization
*must* learn more than one language.

Python is an ideal entre into many concepts central to programming.
It is a very good language to start with.  But to teach about pointers,
it's best to use C itself, although the more general concept is
"indirection" meaning you work with the addresses of data, index
into it (some typical chatter re indirection at [1]).

It helps increase awareness of the hardware itself to think about
addresses as physical locations in RAM.  Python doesn't really foster
this awareness.  Assembler and C (a higher level assembler) both
do foster this awareness.

A given computer course need not focus on just one language to the
exclusion of all others.  You don't have to become a master of C, or
Python, in any one course.

Besides, Python is written in C.  All the people currently developing
Python know C and therefore understand pointers.

In many schools, the most rigorous data structures and algorithms
courses are built around Scheme.  They use that book by Abelson & Sussman
(SICP)[2].  This isn't a bad way to go either, but again, I don't think
it's a matter of picking just one language.

If you're really getting deeply into programming, you need to work
with strongly typed, compiled languages, not just interpreted
dynamically typed ones.

All that being said, I agree that an algorithm, in the abstract sense,
should not be confused with the syntax and design of any specific
language.  Indeed, when going the multiple languages route, as
described above, it pays to implement the very same algorithm in
multiple languages.

Kirby

[1] http://developer.apple.com/techpubs/mac/runtimehtml/RTArch-28.html
[2] http://mitpress.mit.edu/sicp/full-text/book/book.html