Python's simplicity philosophy

Patrick Maupin pmaupin at speakeasy.net
Wed Nov 12 07:20:14 CET 2003


Douglas Alan wrote:

> Your claim is silly.  sum() is not *way* simpler than reduce(), and
> anyone can be explained reduce() in 10 seconds: "reduce() is just like
> sum(), only with reduce() you can specify whatever addition function
> you would like."

Maybe reduce() can be explained in 10 seconds to someone who has used
sum() a few times, but that has no bearing whatsoever on trying to
explain reduce() to someone if sum() is not available and hasn't
been used by them.

> > they were not taught to my son in _his_ equivalent course [it used
> > Pascal], and are not going to be taught to my daughter in _her_
> > equivalent course [it uses C].
> 
> 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.

> You should be assuming that your audience are the smart people
> that they are, rather than the idiots you are assuming them to be.

Ignorance is not stupidity.  I have yet to see a language which
can be used by stupid people with consistent success; however I
have seen a great deal of evidence that Python can be used very
successfully by ignorant people.  It gently eases them in and
allows them to perform useful work while slowly reducing their
ignorance.

> I sure hope that Python doesn't try to emulate C.  It's a terrible,
> horrible programming language that held back the world of software
> development by at least a decade.

I used to hate C.  But then, when it borrowed enough good concepts
from Pascal and other languages, and the compilers got smart enough
to warn you (if you cared to see the warnings) about things like
"if (x = y)"  I stopped using Modula-2.  C held software back 10
years in the same manner as Microsoft did, e.g. by helping to
standardize things to where I can buy a $199 system from WalMart
which would cost over $20,000 if everybody kept writing code like
the pointy-headed ivory tower academics thought it ought to be written.
For certain problem domains (where domain includes the entire system
of software, hardware, real-time constraints, portability, user
expectations, maintainability by a dispersed team, etc.), C is an
excellent implementation language.  But don't take my word for it --
open your eyes and look around.  Could there be a better implementation
language?  Sure.  Would C acquire the bare minimum features needed
to compete with the new language?  Absolutely.

(But I freely admit I'm a luddite:  I prefer Verilog to VHDL, as well.)

> The reason for Python's wide acceptance isn't because it is
> particularly well-designed compared to other programming languages
> that had similar goals of simplicity and minimality (it also isn't
> poorly designed compared to any of them -- it is on par with the
> better ones) -- the reason for its success is that it was in the right
> place at the right time, it had a lightweight implementation, was
> well-suited to scripting, and it came with batteries included.

I'd vote this as the statement in this group most likely to start
a religious flamewar since the lisp threads died down.

I'm not particularly religious, but I _will_ bite on this one:

1) In what way was it at the "right place at the right time?"  You
didn't name names of other languages, but I'll bet that if you can
name 5 which are similar by your criteria, at least two of them
were available when Python first came out.

2) What part of "lightweight implementation, well suited to scripting"
contradicts, or is even merely orthorgonal to "particularly well-designed"?

3) Do you _really_ think that all the batteries were included when
Python first came out?  Do you even think that Python has more batteries
_right_ _now_ than Perl (via CPAN), or that some competing language
couldn't or hasn't already been designed which can coopt other languages'
batteries?

I can accept the premise that, for Python to enjoy the acceptance
it does today, Guido had to be lucky in addition to being an excellent
language designer.  But if I were to accept the premise that Python's
popularity is due to sheer luck alone, my only logical course of action
would to be to buy Guido a plane ticket to Vegas and front him $10,000
worth of chips, because he has been extremely lucky for many years now.

Pat




More information about the Python-list mailing list