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

Carl Banks imbosol at vt.edu
Fri Nov 8 21:06:43 EST 2002


David Eppstein wrote:
> In article <aqhmib$ei8$2 at solaris.cc.vt.edu>,
> Carl Banks <imbosol at vt.edu> wrote:
> 
>> Python is more like Lisp than most other languages, though.  It's
>> similar semantically.
> 
> This makes little sense to me.  Even the most basic data structures are 
> different: Lisp is based around singly linked lists while Python uses 
> vectors (with efficient random access unlike Lisp lists) and 
> dictionaries.

Well, I think the data structures are similar, if you look at the
whole picture instead of just two types that share a name.

Excepting the list types of both languages, neither of which has a
built in analogue in the other, the structures are similar.  Python
tuples are like Lisp vectors.  Python dicts are like Lisp hash arrays.
Functions are first class objects in both languages.

The numeric system is similar (except Lisp has rationals), it has
similar coercion rules, they treat division problems similarly (i.e.,
distinguishing true and floor division).

The object systems of the languages share some peculiarities.  Classes
are objects in both Lisp and Python.  In fact, from Python 2.2 on, the
built-in class framework are analogous: Lisp standard-class = Python
type, Lisp standard-object = Python object.  Obviously, Lisp's
multiple-dispatch methods are far different from Python methods.

And, getting get back to lists for a second, despite the fact that
they are different, a lot of languages don't even *have* lists built
in.

In the end, I think Python and Lisp have similar data structures that
serve similar purposes.  Can you think of any languages that have data
structures more similar to Lisp's than Python?  I don't think there
are too many.


> They are also not especially similar in programming 
> style, although both are capable of being used with a wide variety of 
> styles.

Yes, but hardly any language has a programming style similar to Lisp.


> The most important similarity I see is that in both languages, 
> values have types but variables are untyped, but that was also true in 
> radically different languages such as Snobol and APL; is that really 
> enough to conclude that Python and Lisp are more like each other than 
> anything else?

Well, I think that's big.  On a related note, they are both highly
dynamic.


Let me clarify something, though: I said Python is a lot closer to
Lisp than most other languages are.  I didn't say Python is
necessarily similar, just less unsimilar.

And the converse isn't true: Lisp is not closer to Python than most
other languages are.  Python has a lot of friends; Lisp stands far
away from the crowd and hangs out with it's dialectal buddies.  But,
Python is standing on the end of the crowd closest to Lisp.


-- 
CARL BANKS



More information about the Python-list mailing list