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

Gareth McCaughan Gareth.McCaughan at pobox.com
Fri Nov 8 20:26:20 EST 2002


Someone called "larry" wrote:

>  Another question that could be asked about Lisp is:
>  Most people it seems have nothing good to say about lisp:"it's hard to
>  read,it's slow, nobody uses it, it's hard to learn etc, etc".
>  Lisp is constantly being bashed
>  and yet Lisp has survived for over 40 years and several companies
>  (Franz, Xanalys, Digitool)
>  seem to make a profit selling lisp compilers. SOMEBODY is using Lisp.
>  If lisp is such a crummy language why has it survived at all for so
>  long?
>  Why do SOME people think Lisp is a fantastic programming langugae?
>  Are we missing something?

I strongly suspect that "larry" knows this already, but:
Yes, Lisp has a lot more going for it than popular rumour
suggests. For instance:

  - it's one of the few dynamically typed languages
    that can provide execution speeds comparable to
    C, Fortran and the like.

  - its syntax, offputting though it is to most newcomers,
    enables an astoundingly powerful macro system in which
    you can do just about anything; in other words, you
    can customize the syntax to suit the domain you're
    working in.

  - its object system is more sophisticated than just about
    any other, including

      - multiple dispatch (i.e., methods specialized on more
        than one parameter's type: say goodbye to the "Visitor
        pattern")

      - a wide range of "method combinations", allowing a
        nice low-effort way to say things like "Make this
        method do X, then call the corresponding method on
        the parent class" or even "call the corresponding
        method on each parent class, and add the results up"

      - a "meta-object protocol" (not part of the ANSI standard,
        but a de facto standard, presentin every major
        implementation) which lets you customize the behaviour
        of the object system

  - its (unusual) approach to exception handling allows you
    to do cool things like continuing execution from the point
    where the exception happened, after fixing whatever the
    problem was.

  - it has decent support for numerical applications: multidimensional
    arrays, a well thought out set of arithmetic and transcendental
    operations, a variety of floating-point formats, unlimited
    precision integers and rationals done right, etc.

Plus a bunch of things that Python does well too, of course.

Lisp has weaknesses. Its standard library, though much better
than (for instance) C++'s in my opinion, is very lacking in
the "real-world" components where Python's shines. No networking,
database connectivity, graphics, web servers, and so on. There
are libraries for all that stuff, but they aren't standardized
and don't come with every implementation. Batteries not included.
The syntax *is* weird. (But one gets to love it, especially for
the convenience it gives to macros.)

-- 
Gareth McCaughan  Gareth.McCaughan at pobox.com
.sig under construc



More information about the Python-list mailing list