do...until wisdom needed...

Harry George hgg9140 at cola.ca.boeing.com
Tue May 8 14:02:25 EDT 2001


My impression is that if you work in nothing but Lisp for an extended
period, your mind builds up its working set of idioms and you can be
marvelously effective.  But if you are dodging back and forth among
languages, it is tough to regain that working set.

What I like about python is that I can regain the working set very
rapidly, e.g., after a few weeks of C++, perl, FORTRAN, or Lisp.
There cases where a sleek idiom in Lisp allows for cutting out a few
lines of python, but it takes longer to look them up than it does to
write the darn lines.  In most situations, I find python more elegant
than lisp (since those situations were of course addressed in the
language design).

Macros, however, really screw up the ability to shift back and forth.
For example, I'm in a production environment (knowledge-based
engineering) using Lisp which is heavily modified by macros.  The
resulting language is unrecognizable, with flavors-style objects, lazy
evaluation, object reference chains, and naming conventions that put
*everything* in the keyword namespace.  But when the macros can't do
the job (often), you have to drop back into raw Lisp -- kind of like
doing assy in a C program.  You end up with an awkward mixture of
syntaxes and semantic models.

It is a grim learning curve, and it is very easy to forget (e.g., if
you have to do something else for a month or two).  As Norvig says in
Paradigms of AI Programming (1992, pg 66):

"The first step in writing a macro is to regignize that every time you
write one, you are defining a new language that is just like Lisp
except for your new macro."

So, please don't macro-ized python.  Write your own "small language"
if you wish, and translate that into python, but don't mess with the
language itself.  And, if someone insists on "templates", at least do
Modula-3 style generics instead of C++-style templates.  (Though it
seems to me python is adequately polymorphic to not need templates
either.)

Courageous <jkraska1 at san.rr.com> writes:

> >Alternative hypotheses might be entertained.  Maybe
> >Scheme isn't as widely used in teaching as all that --
> >what % of first CS courses use it?  Maybe Scheme can
> >be perfectly suited to teaching and exploration but
> >not as useful for production use -- the way a richer
> >but more complicated tool such as Common Lisp might
> >be -- and perhaps
> 
> The one missing alternative hypothesis is the most
> mundane of them, and the one that perhaps will stick
> in the advocates craw more than the others:
> 
> Perhaps the majority of most of those who've tried
> Scheme (or Lisp) simply don't like it.
> 
> "I don't like this, therefore I'm not going to use it," while
> distressing to some ("but, but, but... it's better, I tell you!"),
> is a fairly ironclad position.
> 
> C//
> 

-- 
Harry George                E-mail:  harry.g.george at boeing.com
The Boeing Company          Renton:  (425) 237-6915
P. O. Box 3707  02-CA       Everett: (425) 266-3868
Seattle, WA 98124-2207      Page:    (425) 631-8803  



More information about the Python-list mailing list