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

Thomas Bellman bellman at lysator.liu.se
Wed May 16 08:30:53 EDT 2001


Isaac To Kar Keung <kkto at csis.hku.hk> writes:

> In Lisp, "everything is a List", so the code to execute is a list.  We don't
> need to "parse" it: it is in a format that Lisp interpreters can run right
> away.

> In Tcl, "everything is a string", so the code to execute is a string.
> Really not a lot of differences in concepts: you run the "string" right
> away.

> Both would need the execution environment to understand how to execute a
> "list" or a "string".  Whether you call it "interpretation" or "parsing" is
> up to you.  But of course, I'd rather use lists to represent my program
> rather than strings.

Parsing and executing is two entirely different things.  I was
not talking about just passing a bit of code to an 'execute'
procedure (which is called eval in LISP, exec in Python, and
I-don't-know-what in TCL); I was talking about parsing the code
in order to be able to modify it.  You don't get that for free
just because you have the code in a string and the 'execute'
procedure takes a string as its argument.


-- 
Thomas Bellman,   Lysator Computer Club,   Linköping University,  Sweden
"I don't think [that word] means what you    !  bellman @ lysator.liu.se
 think it means."   -- The Princess Bride    !  Make Love -- Nicht Wahr!



More information about the Python-list mailing list