Subject: Re: merits of Lisp vs Python
From: (Rob Warnock)
Date: Mon, 18 Dec 2006 20:35:35 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Maciek Pasternacki  <> wrote:
| Jon Harrop wrote:
| > Lisp has some interesting features that separate it from many other
| > programming languages. In contrast, there is nothing interesting about the
| > Python language, AFAIK.
| One word: yield.  It's only thing I miss from Python when programming
| Lisp.
| With generators, I can think and write in terms of generating sequence
| and not carry about state.  I get transparent co-programs for free.
| Yes, there is Arnesi CPS transformer-based emulation of generators,
| but CPS transofmation gives inefficient code (function body is parsed
| into set of structures and evaluated by hand) and has some major
| caveats (no way of handling conditions within WITH-CALL/CC).

A fully-general CALL/CC is not necessary. In any Common Lisp
implementations with threads (and it doesn't really matter whether
it's OS threads or "green" threads [coroutines] as in CMUCL),
you can implement "proper" generators with a natural YIELD function
fairly easily. E.g., look at the MP:PROCESS-YIELD function in
implementations with CLIM-like threads.

And you can handle conditions within your generator threads however
you like...


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607