[Python-ideas] PEP draft - Composable futures for reactive programming

Nick Coghlan ncoghlan at gmail.com
Sat Dec 21 15:12:46 CET 2013


On 21 December 2013 23:14, Sergii Mikhtoniuk <mikhtonyuk at gmail.com> wrote:
> Please have a look at this PEP draft, and reference implementation (as
> separate library).
>
> I’m very interested in:
> - How PEPable is this?

This looks like a really interesting idea, and well worth pursuing as
a PEP for 3.5 (the failure to make the Future/Promise split was
actually noted as a flaw in the concurrent.futures design at the time,
but wasn't seen as serious enough to prevent inclusion of the module.
However, this draft PEP does a decent job of showing the kinds of
operations that the current combined class design can make difficult)

> - What are your thoughts on backward compatibility (current implementation
> does not sacrifice any design points for it, but better compatibility can be
> achieved)?

Yes, I think better compatibility is needed. One possible option would
be to take the path of defining a "concurrent.futures.abc" module that
provides this higher level API, and largely leave the existing
concrete classes alone (aside from adjusting them to fit the ABC).

The main possible issue I see is with the result setting APIs on the
existing Future objects.

There are also a lot of staticmethod declarations that look like they
should probably be classmethod declarations.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list