<p dir="ltr"><br>
On 10 Sep 2014 19:41, "Martin Teichmann" <<a href="mailto:lkb.teichmann@gmail.com">lkb.teichmann@gmail.com</a>> wrote:<br>
><br>
> Hi Guido, Hi List<br>
><br>
> > I think it's too soon to start inventing new syntax to address these; instead, I strongly<br>
> > recommend changing your APIs to use explicit method calls instead of the special<br>
> > syntax you so favor. Even __getitem__() returning a Future feels awkward to me<br>
> > (unless it's clear that the container you have in front of you is a container full of Futures).<br>
> > [...]<br>
> >  But again I would like to establish asyncio as the de-factor standard for asynchronous work<br>
> > before trying to tweak the language more<br>
><br>
> I agree that first we need to settle a bit and look how everything<br>
> works, but hey, this is python-ideas, the list for "discussing speculative<br>
>  language ideas".<br>
><br>
> Limiting all APIs to just use explicit method calls unfortunately<br>
> leads to a very Java-like language that misses all the cool features<br>
> of python. And this is not limited only to low-level stuff, but also<br>
> high level interfaces. Right now I am actually working on a<br>
> distributed framework, where users which are not professional<br>
> programmers are supposed to write their own plugins. My boss<br>
> is constantly bugging me "all that yield from stuff looks complicated,<br>
> can't you just  put it in a function the user calls so they<br>
> don't see it anymore?" Well, as you know, I cannot. Even in the<br>
> highest level of abstraction, every function that needs to do I/O<br>
> has to be yielded from.</p>
<p dir="ltr">The local visibility of the asynchronous flow control is deliberate. Folks that don't want that behaviour to be visible in user level code have the option of using gevent as a synchronous to asynchronous adapter to provide a developer experience that is closer to the pre-emptive multithreading many folks are used to working with.</p>
<p dir="ltr">For a couple of longer discussions of some of the trade-offs involved in adopting that more implicit approach, you may want to take a look at my post at <a href="http://python-notes.curiousefficiency.org/en/latest/pep_ideas/async_programming.html">http://python-notes.curiousefficiency.org/en/latest/pep_ideas/async_programming.html</a> as well as Glyph's at <a href="https://glyph.twistedmatrix.com/2014/02/unyielding.html">https://glyph.twistedmatrix.com/2014/02/unyielding.html</a></p>
<p dir="ltr">Regards,<br>
Nick.</p>