language aesthetics

Peter Olsen pcolsen at comcast.net
Tue May 20 20:51:11 EDT 2003


sandskyfly at hotmail.com (Sandy Norton) wrote in message news:<b03e80d.0305160317.2963cab1 at posting.google.com>...
> Hi,
> 
> I often worry that I've become so 'comfortable' with python that I may
> end turning into a language bigot not appreciating the ideas and
> motivations behind other language designs. As a counter to this, I
> usually take it upon myself to put some effort into learning how other
> languages do it. At times this leads to wonderful and rewarding
> journeys (e.g. haskell), and at other times, I run away screaming back
> to pythonistan (e.g.
> http://www.perl.com/pub/a/2003/04/09/synopsis.html ).
> 
> My question is: what other languages 'fit' the common aesthetic (if it
> exists) of a pythonista?
> 
> Cheers,
> 
> 
> Sandy

I recommend Scheme, a lexically-scoped variant of lisp, for several
reasons.

1.  Scheme is an elegant language.  I've never seen another in which
complex algorithms can be so clearly expressed.  Once I've written an
algorithm in Scheme, then I know I understand it.

2.  Scheme supports "The Structure and Interpretation of Computer
Programs" by Harold Abelson and Gerald Jay Sussman.  This is simply
the best computer science book I have ever read --- and among the very
best technical books I have ever read, period.  If you read the book
("READ THE BOOK!!"), you'll learn Scheme along the way.

3.  Comparing Python and Scheme can provide some deep insights into
the philosophy of design and what makes a language (or almost anything
else) successful in the marketplace.

That statement deserves a little explanation.  In "Lisp: Bood News,
Bad News, How to Win Big"
(http://www.laputan.org/gabriel/worse-is-better.html), Richard Gabriel
talks about the differences between the "MIT/Stanford" and the "New
Jersey" schools of programming.  Indecently simplified, these can be
summarized as "do the right thing (no matter how long it takes)"
(MIT/Stanford) and "do the (mostly) right thing and get on with it."

Scheme does "the right thing," but it's hard to use for real ("They'll
pay you for it.") programming.

First, most people don't know about it.  

Second, if they do know about it, they don't like it because "it's
Lisp (and we're not doing AI)," and

Third, it's hard to find tools to do anything off-the-shelf.

The last problem is the most maddening.  Had it not been for the lack
of tools, Scheme "coulda been a contenda."

Python, on the other hand, does "the (mostly) right thing" in a very
useful way.  There are certainly areas for improvement, hence the
stream of PEPs, but Python's "(mostly) right thing" has been close
enough to a really right thing (whatever one may be) to make it a very
productive tool.  In particular, it has led to the development of the
libraries that make Python an almost-always "Batteries Included"
solution.

Let me give you an example.  I want to run both a POP3-server and a
simple SMTP server on my PocketPC under WinCE-3.0.  (I have my
reasons.)

My experience clearly highlights the differences between the two
languages.  On most other platforms, I'd pick one of the many
excellent Python implementations, get it running, and move on to other
things.  This was my original motivation for installing PythonPPC, the
Python port to WinCE-3.0.

Unfortunately, PythonPPC doesn't have all the system support I need to
do that.

On the other hand, there are several excellent Scheme implementations
for the Pocket PC.  I believe at least one of them provides all the
support I'd need --- but I will have to write my own servers to make
use of it.

That's right, when it comes to POP3 and SMTP its "Python servers
everywhere, but not one (mail) drop for Scheme."

So, my bottom line: if you're looking for a second language, learn
Scheme.  Understanding both Scheme and Python will teach you both
about the science of computing and the art of writing systems that
people will actually use.

Peter Olsen, PE.
pcolsen at comcast.net
"Engineering is the art of using a professional knowledge of
mathematics and the physical sciences to improve the quality of life."




More information about the Python-list mailing list