[Python-ideas] async/await in Python

Andrew Barnert abarnert at yahoo.com
Sun Apr 19 09:23:29 CEST 2015


On Apr 18, 2015, at 23:21, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
> Andrew Barnert wrote:
>> The only problem is that, when it's important to specify that you mean the
>> new kind of coroutines explicitly, there's no obvious way to do so--if I say
>> "async coroutines" someone may reasonably think I'm referring to "coroutines
>> as user in asyncio".
> 
> PEP 3152 solves this problem by calling them "cofunctions",
> which doesn't collide with any existing terminology that
> I'm aware of.

Sure; if we go with the "cofunction" names, there's no conflict; if we go with the "coroutine" names, there is, although it may be easily avoidable. So that counts as a point in favor of the former.

In the other direction, while don't think (although some people in this thread obviously disagree) there's anything inherently confusing about "cofunction", or anything inherently intuitive about "awaitable coroutine", the fact that F# used the latter terminology, and a number of well-known languages have copied it and heavily encouraged its use, definitely makes a difference.

Anyway, since the difference is (as you pointed out) ultimately just about names (and maybe some minor details of which features go into the first version and which get added later), I think the opinions of to the people who will be teaching and/or evangelizing the feature are so much more useful than mine that I don't have any more to say.


> -- 
> Greg
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list