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

Sergii Mikhtoniuk mikhtonyuk at gmail.com
Sat Dec 21 14:14:05 CET 2013


Hi all,

I would very much appreciate your opinion on my proposal for improvement of
*concurrent.futures* package.

Comparing to other languages such as Scala and C#, Python’s futures
significantly fall behind in functionality especially in ability to chain
computations and compose different futures without blocking and waiting for
result. New packages continue to emerge (*asyncio*) which provide their own
futures implementation, making composition even more difficult.

Proposed improvement implements Scala-like Future as a monadic construct.
It allows performing multiple kinds of operations on Future’s result
without blocking, enabling reactive programming in Python. It implements
common pattern separating *Future* and *Promise* interface, making it very
easy for 3rd party systems to use futures in their API.

Please have a look at this PEP
draft<https://rawgithub.com/mikhtonyuk/rxpython/master/pep-0000.html>,
and reference implementation <https://github.com/mikhtonyuk/rxpython> (as
separate library).

I’m very interested in:
- How PEPable is this?
- What are your thoughts on backward compatibility (current implementation
does not sacrifice any design points for it, but better compatibility can
be achieved)?
- Thoughts on Future-based APIs in other packages?

Thanks,
Sergii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131221/f8807ec0/attachment.html>


More information about the Python-ideas mailing list