What can you do in LISP that you can't do in Python

Ype Kingma ykingma at accessforall.nl
Mon May 14 15:40:16 EDT 2001


Alex Martelli wrote:
> 
> "Richard P. Muller" <rpm at wag.caltech.edu> wrote in message
> news:3AFFFB0E.70A8B5BF at wag.caltech.edu...
>     ...
> > However, thus far I can't see anything that I could do in Scheme that I
> > couldn't do in Python. From the thread on LISP I've seen a lot of
> > comments that have suggested that I should have started with Common Lisp
> 

There is one thing that is much easier in Lisp than in Python:
manipulation of a function (a future argument to apply()) at
the language structure level. In Lisp the program itself is
expressed as a recursive list, so manipulating it boils down
to list manipulation. In Python you would have to do manipulate
the program text instead, and doing that without
violating Python's indentation requirements is not as straightforward.

I also read Paul Graham's article. Programs manipulatable as lists
was the only 'competitive' advantage I could think of.
He nicely concealed what he thinks is the 'competitive advantage' of Lisp.

> Python, Scheme, Common Lisp, and a zillion other languages (including
> C, C++, Java, Fortran, Cobol, PL/I, Ada, Perl, Basic, ...) are all
> "Turing Complete" (to within the physical limitations imposed by
> finiteness of computer hardware), so you will never find anything
> that you "could do in X and couldn't do in Y" for any X and Y in
> this set of languages.  The differences are not between the sets of
> functions that are computable in the various languages: it's all
> a matter of convenience and productivity in developing the programs
> (which are influenced by available development tools, environments
> and libraries, as well as the languages themselves!), and speed and
> other resource-consumption characteristics of the solution that is
> eventually developed (again, characteristics of tools and libraries
> available may have very large influence on such speed &c).

Which begs the question: what is so convenient and productive about
manipulating a Lisp function as (recursive) lists before passing
it to apply()? Or is there another advantage of Lisp?

Did Paul Graham use a design pattern that is not widely known?

>...

(python-is-not-it's-own-intermediate-language-ly yours,)

Kind regards,

Ype

-- 
email at xs4all.nl



More information about the Python-list mailing list