merits of Lisp vs Python

Paul Rubin http
Sun Dec 10 07:36:43 EST 2006


"Alex Mizrahi" <udodenko at users.sourceforge.net> writes:
> so, it's very close to writting new interpreter -- but it's order of 
> magnitude easier to write this interpreter via macros than from scratch, 
> most other language constructs can be reused.

But now you've got an interpreter and you no longer have that Lisp
compiler.

> there is a chapter about continuations in Paul Graham's "On Lisp".
> 
> "Common Lisp doesn't provide call/cc, but with a little extra effort we can 
> do the same things as we can in Scheme. This section shows how to use macros 
> to build continuations in Common Lisp programs."

I think he's mistaken about being able to implement call/cc in full
generality with CL macros in any reasonable way.  But it might be
possible to implement enough to do something like Python generators
using lexical closures that one re-enters through some kind of cond
statement selecting the yield point to be continued from.



More information about the Python-list mailing list