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

Cary O'Brien cobrien at Radix.Net
Tue May 15 10:27:54 EDT 2001


In article <9dpqra$5gl$1 at newsy.ifm.liu.se>,
Thomas Bellman <bellman at lysator.liu.se> wrote:
>"Richard P. Muller" <rpm at wag.caltech.edu> writes:
>
>> 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
>> instead of Scheme -- so maybe that's the problem. But can someone give
>> me a short example of something that I can do in LISP that I couldn't do
>> in Python?
>
>As others have already said: manipulating code.  Macros.
>
>In LISP it is easy to define new control structures with slightly
>different, or entirely new, semantics from those that are already
>present in the language.  A couple of examples:

[big snip]

>...of the controlled code.  That is much easier in LISP than in any
>other language I have seen.
>

I think it is pretty easy to write new control structures in TCL,
since you can eval a string in the calling context.  Like a 12 line
tcl proc that loops over a SQL result set, binds the columns to
variables, and runs the "body" of the loop.  Is this the same thing?

-- cary



More information about the Python-list mailing list