I've found this paper ("Practical Functional Reactive Programming") , the authors (as far as I understand) try to create an FRP library in Python in the spirit of Yampa.
I've also found these interesting slides featuring SPJ! The slides seem conclude that it is not so easy to implement FRP in a dynamically typed language - unfortunately the bullet points in those slides do not really explain why.
Why are there, apparently, not so many FRP implementations in Python? Why is it more prevalent in Haskell? Is the static typing really needed for FRP? How much do we gain by static typing in FRP? Is it super essential or can one get by without it (if one is only writing a few thousand lines of FRP code)?
I really wonder, if SodiumFRP can be implemented in C, Java, Haskell etc. then what is the problem with Python?
It is relevant to note that in JS there is no real FRP implementation either at the moment (2015.08.04), so that suggests that the lack of static typing in Python is the reason, I am not convinced though, hence the question.
UPDATE: Interestingly, I've came across Flow Based Programming in Python. How do FBP and FRP relate to each other ? They only seem to differ just a little bit, at least, I have that first impression when I compare the bottom of the acronyms' middle characters.
Reactive Programming is a programming paradigm oriented around data flows and the propagation of change. This means that, when a data flow is emitted by one component, the Reactive Programming library will automatically propagate those changes to other components until it reaches the final receiver.
Functional reactive programming (FRP) is a programming paradigm for reactive programming (asynchronous dataflow programming) using the building blocks of functional programming (e.g. map, reduce, filter).
Reactive Extensions (Rx) are similar to Future. Future can return an independent element, while Rx returns a stream that can be subscribed to. The same set of specifications is supported on different platforms.
Functional programming paradigm is built upon the idea that everything is a pure function. Reactive programming paradigm is built upon the idea that everything is a stream observer and observable philosophy.
"The Reactive Extensions for Python (RxPY)" is imho coming closest to FRP with Python.
There is also aioreactive, which utilizes newer language features such as async/await.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With