16

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.

jhegedus
  • 18,516
  • 11
  • 84
  • 147
  • Did your second "this" miss its link? I've found this paper about **this** topic but I did not find any review about what is available. – Yu Zhang Sep 04 '15 at 04:41
  • 2
    The overwhelming majority of the python community has no particular interest in functional programming beyond basic operations like maps and folds perhaps. It's just not the kind of community where FRP, which is right now still arguably in the research stage, would become hugely popular. – Cubic Sep 04 '15 at 04:42
  • @Cubic : interesting point. – jhegedus Sep 04 '15 at 04:46
  • 1
    Note there is a difference between FRP and RP as pointed out by André Staltz at https://gist.github.com/staltz/868e7e9bc2a7b8c1f754, which is worth reading if you are interested in RP. This is mentioned in the 2nd comment where he says that FRP is a fuctional programming variant of RP. I understand this to mean that FRP is one way of implementing RP and both share a common set of traits such as event-driven, responsive, scalable and resilient in terms of TypeSafe's reactive manifesto, see http://www.slideshare.net/deanwampler/reactive-design-languages-and-paradigms. –  Sep 04 '15 at 05:14
  • 1
    I know Andre, we co-organize http://www.meetup.com/Helsinki-Functional-Reactive-Programming-Meetup/. My question is restricted to FRP. – jhegedus Sep 04 '15 at 05:21
  • To closers : if you close this question, then please also close this too : http://stackoverflow.com/questions/13341937/whats-the-status-of-current-functional-reactive-programming-implementations , otherwise, please reopen because this question is useful, in my very humble opinion. – jhegedus Sep 04 '15 at 07:17
  • 2
    @jhegedus don't blame closers. I voted to reopen but it took me a while (and the link to the Haskell question) to decide this wasn't a "too lazy to search" question. That other question is much more specific. For example, it doesn't just link to some articles, it provides a summary of what's in them. As it is, your question forces people to go read the articles just to understand what you are asking. You still need to persuade two others, so I suggest you improve the question – Panagiotis Kanavos Sep 04 '15 at 07:55
  • @PanagiotisKanavos, right, I agree. I try to improve the question. – jhegedus Sep 04 '15 at 08:37

2 Answers2

4

"The Reactive Extensions for Python (RxPY)" is imho coming closest to FRP with Python.

Red Pill
  • 443
  • 5
  • 15
1

There is also aioreactive, which utilizes newer language features such as async/await.

Rotareti
  • 31,464
  • 14
  • 87
  • 93