Python's simplicity philosophy

Christopher A. Craig list-python at ccraig.org
Wed Nov 12 09:51:09 EST 2003


pmaupin at speakeasy.net (Patrick Maupin) writes:

> Douglas Alan wrote:
> > Then your children were done a great diservice by receiving a poor
> > education.  (Assuming that is that they wanted to learn Computer
> > Science, and not Programming in Pascal or Programming in C.)
> 
> I'm sorry, but from a pure CS viewpoint, reduce() is way off the
> radar screen.  Especially for a 101 course.  If either of my daughters
> wanted to discuss reduce() while taking such a course, I'd want to
> see the curriculum to figure out what they _weren't_ being taught.

I'd tend to agree, and I've never found myself on the not teaching
generalities side of this debate before.  An intro CS class should be
about intro to Computer Science and not any particular language, but
reduce() is a fairly specific functional programming concept.  To say
that it should be taught in an intro class is like saying you should
deal with metaclasses, function pointers, or the stack pointer
immediately to teach good computer science.  Algorithms, data
structures, state machines and computational theory are fairly basic
computer science, functional programming can be used to present those,
but is by no means needed.

Also the assumption isn't that Python users are stupid, it's that they
may have little to no CS training.  Python wasn't designed for the
exclusive use of CS trained individuals (which is a good thing,
because I use it to teach computers to Boy Scouts).

Back on topic, I very rarely use reduce() in Python and then only for
optimization (which I rarely do).  The vast majority of the time I
just use a for loop; it just seems to flow better.  

-- 
Christopher A. Craig <list-python at ccraig.org>
"Tragedy is when I cut my finger.  Comedy is when you fall in an open
sewer and die."  Mel Brooks.






More information about the Python-list mailing list