[Python-ideas] The async API of the future: Twisted and Deferreds

Itamar Turner-Trauring itamar at futurefoundries.com
Sun Oct 14 02:59:56 CEST 2012


On Sat, Oct 13, 2012 at 8:17 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:


> But at least you can *see* from the presence of the 'yield'
> that suspension can occur.
>

...

He argues there that greenlet-style coroutines are bad because
> suspension can occur anywhere without warning. He likes
> generators better, because the 'yield' warns you that suspension
> might occur. Generators using 'yield from' have the same property.
>
> If his proposal involves marking the suspension points somehow, then
> syntactically it will probably be very similar to yield-from.
>

Explicit suspension is certainly better than hidden suspension, yes. But by
extension, no suspension at all is best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121013/9659845e/attachment.html>


More information about the Python-ideas mailing list