Why is Python popular, while Lisp and Scheme aren't?

Alexander Schmolck a.schmolck at gmx.net
Wed Nov 20 10:25:15 EST 2002


Kenny Tilton <ktilton at nyc.rr.com> writes:

> Alexander Schmolck wrote:
> > Another related problem is that Common Lisp doesn't scale well. It is a big
> > and complex language and that's it. While this might be a big productivity win
> > for an experienced developer who can leverage a large collection of well
> > thought out standard functions, it makes it a bad choice for many other
> > scenarios (if you knew neight CL nor python, would you rather have your
> > application scripted in python or CL?).
> 
> 
> Puzzled. "scale well" to me means "what happens when you try to use it for a
> big project" or possibly a small project with big runtime resource
> requirements. CL is great at either, precisely because it can do a lot.


"Scale well" normaly implies up, but what I mainly meant is that CL doesn't
scale down well in a couple of ways. One factor are users: CL is a poor
language for people who don't have, X (say 18) months or so of time to spare
to learn CL (which includes pretty much everyone except people who want to
program professionally in CL or language afficados). This doesn't imply that
you can only use CL productively after learning it for X months, but unless
you plan to spend this overall amount, some other language (python, for
example) is likely to be a better choice.

This initial investment is unlikely to be made even by many professional
programmers who might well profit from using CL, let alone normal users who
just want to customize their applications, or scientists who need to do a bit
of programming to handle their data.

The biggest strength of python, to my mind, is that it scales in a variety of
ways (beginners find it easy, experts find it powerful, you can use it to
script PDAs or to power an application server or to write AI code).

> 
> 
> In your final query, it sounds like you mean can it scale beyond the expert
> few. If so, I think CL is very approachable (easy to get going productively
> very quickly)
 
I really wonder what your basis for thinking CL to be very approachable
is. Specifically, what language(s) do you think would be *less* approachable
to a "normal" person than CL? Even perl, which is hideously complex (unlike CL
which is complex, without being hideous), is more approachable in that you can
do something worthwhile without learning much about Perl (e.g.  perl -npe
's/\bcrap\b/\bsuboptimal\b/' < report.txt > new_report.txt). The only less
approachable (but widely used) language I can think of right now is C++ (which
masterfully combines hideous complexity with being quite low-level).

How about the following criteria for approachability of a language:

1. it should be easy to do conceptually simple and common things
2. it should be easy to do something useful with it
3. it should be easy to read other peoples code
4. it shouldn't have too many surprises in store (e.g. undefined behavior)

I think CL fails on all these criteria, for example:

1. operations on files and directories.
2. try to write something in 1-100 lines in CL that couldn't easier be
   written in e.g. python.
3. just think of how many ways there are to express quite similar
   conditional or looping constructs.
4. try e.g. modifying constant lists or writing a LOOP with undefined
   behavior, or modifying the (string) keys in a hash-table.


> and then one just keeps on learning more and more cool stuff because it is
> so rich.

Well, in python you can also learn new cool stuff till you reached a fairly
high level (e.g. generators and metaclasses), but most of the code you write
will still be quite readable to less clued programmers, because simple things
are invariably expressed in pretty much the same way. So while a newbie might
have problems groking my generator code, most other things should still be
ok. I want to see the CL newbie that understands e.g. the series, dolist, loop
and mapcar etc. version of the same algorithm.


alex



More information about the Python-list mailing list