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

Pascal Costanza costanza at web.de
Wed Nov 20 11:30:53 EST 2002


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

>>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.

Where do you get these numbers from?

I have started to take a serious look at Lisp and Scheme in April (i.e., 
April 2002). I have started to implement a Virtual Machine for Java 
bytecode in Common Lisp in July 2002 (i.e., a just-in-time compiler that 
translates Java bytecode to Common Lisp code at load time). The core of 
this Virtual Machine executes the first few test programs since the 
beginning of this month (November 2002).

So in effect, I have successfully written a piece of software in Common 
Lisp within 5 months that I wouldn't even have attempted to write in any 
other language. (And I have only spent about 8 hours per week because I 
have done it in my spare time.)

> 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.

Professional programmers should be able to write reasonable programs in 
Common Lisp in a short amount of time. Otherwise, I would have a problem 
to actually call them "professional". (The amount of time should be 
shorter than in my case, because I am not regularly actively programming 
- I am mainly doing programming language research.)

For average programmers (whatever that means), I firmly believe that 
Common Lisp is among the best choices to learn quite a number of 
advanced concepts that _make_ them more professional.

It's true that end users probably don't benefit a lot from Common Lisp. 
However, I am not sure about this bit. (What you can do is to divide the 
work load among experts on the one hand who design domain-specific 
languages and end users on the other hand that use these domain-specific 
languages. Common Lisp's features are excellent for this scheme. BTW, 
that's the whole point of the field of Generative Programming.)

>>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.
[...]

> 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.

Operations on files and directories in Common Lisp are designed to be 
portable across different operating systems. (Note that in this regard, 
Unix and, say, Windows file systems are very similar.)

You can't pick an arbitrary part of a language/library and blame it for 
its complexity. You could also state that Python doesn't make it easy to 
do conceptually simple and common things and then name macro programming 
as an example. Macro programming is in fact conceptually simple and 
common in Lisp!

Each language has its strengths and weaknesses in different areas. I 
don't know a single language that's equally strong in all areas. (So I 
think that neither your statement nor my statement made up on the spot 
about macro programming in Python make any sense.)

> 2. try to write something in 1-100 lines in CL that couldn't easier be
>    written in e.g. python.

Hello World in Common Lisp:

 > "Hello, World!"
"Hello, World!"

I hope you get the joke. ;-)

> 3. just think of how many ways there are to express quite similar
>    conditional or looping constructs.

How do you measure readability?

Meiner Meinung nach hängt das im wesentlichen immer davon ab, welche 
Sprache man zuerst gelernt hat, oder welche man am häufigsten benutzt.

If you don't understand this, would you consider German to be less 
readable than English? (Run that sentence through 
http://babelfish.altavista.com to get my point. ;)

> 4. try e.g. modifying constant lists or writing a LOOP with undefined
>    behavior, or modifying the (string) keys in a hash-table.
> 
> 

In any language I know, beginners make similar mistakes.

>>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.

Common Lisp is not designed for newbies but for experts. IMO, newbies 
should aim at becoming experts. See http://www.paulgraham.com/avg.html 
for some insights related to this point.


Pascal

-- 
Pascal Costanza               University of Bonn
mailto:costanza at web.de        Institute of Computer Science III
http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)




More information about the Python-list mailing list