Lists Home |
Date Index |
> Forwarded by request:
> > Date: Wed, 23 Oct 2002 15:59:18 +0000
> > From: "Clark C. Evans" <email@example.com>
> > To: John Cowan <firstname.lastname@example.org>
> > Cc: Sean McGrath <email@example.com>, firstname.lastname@example.org
> > Subject: Re: [xml-dev] The Browser Wars are Dead! Long Live the Browser
> > On Wed, Oct 23, 2002 at 10:30:44AM -0400, John Cowan wrote:
> > |
> > | Python, like Scheme, has continuations. No other language in regular use
> > | can make that statement.
> > As I recall:
> > - >
> > Python 2.2+ only has generators; for continuations you need
> > StacklessPython. Guido looked at continuations, but they
> > seemed too much of a change, so he went with a lesser cousin
> > which provides 80% of the benefit with 20% of the implementation
> > effort. Details of this can be found in the iterator sig.
> Since Python generators are reified and available to the Python level,
> they seem like continuations to me.
The only difference is that generators can only be resumed to the calling
context. They cannot be resumed to arbitrary contexts, as true continuations
can. I'm not an expert on these matters, but the long discussion of this on
python-dev convinces me that there are almost no practical situations where
this difference is significant and cannot be worked around fairly easily.
Certainly for the several generator idioms that sweeten XML processing,
resuming to calling context is all you need.
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Python&XML column: 2. Introducing PyXML - http://www.xml.com/pub/a/2002/09/25/p
The Past, Present and Future of Web Services 1 - http://www.webservices.org/ind
The Past, Present and Future of Web Services 2 - 'http://www.webservices.org/in
Serenity through markup - http://adtmag.com/article.asp?id=6807
Tip: Using generators for XML processing - http://www-106.ibm.com/developerwork