merits of Lisp vs Python

Paul Rubin http
Fri Dec 8 20:51:01 EST 2006


"JShrager at gmail.com" <JShrager at gmail.com> writes:
> Well, okay, Scheme [same thing (to me), although I realize that they
> aren't, quite -- and CWCC is one place where they aren't!] But I don't
> follow why you can't come very close by appropriate macrification of
> closures. 

You have to be able to return from the closure, then re-enter it
(possibly from a different place in the calling program) with all the
lexical variables intact.  You have to be able to do this from
multiple places inside the closure.  You have to be able to re-enter
and re-exit other such closures between the entry and exit of the
first one.  This all has to work with closures that are recursive.

Yeah, Lisp macros are Turing-complete and you could basically
implement a coroutine-supporting compiler out of macros and do all of
the above, but the target language wouldn't be Lisp any more.



More information about the Python-list mailing list