This is not a simple question I understand that. Hence, pointers would be well appreciated (or enough)
I have tried to decipher multiple posts on here e.g.
- Why should the observer pattern be deprecated?
- https://stackoverflow.com/questions/16652773/what-is-difference-between-observer-pattern-and-reactive-programming#:~:text=A%20simple%20way%20to%20put,the%20data%20and%20UI%20dependencies
that explain how the overaching principle of FRP "among other" solve the issue that the observer try to solve. I suspect i would need to study how library like ZIO or fs2 actually solve the issue in a purely functional way.
But i wonder if before diving into the implementation detail, there is not a way, to reduce this to its essence and give the general idea that solve the main drawback of the observer pattern to achieve event driven code.
An intuition that i have so far is that FRP "among other" decouple the Observer and observee basically via for example a queue, which can be hidden behind the concept of MailBox in akka stream for example.
So in short my question is: "In Essence" what approach does FP take to solve the issue that the observer pattern solve in OOP. I'm not asking explanation about how the Observer does not match FP with for example by being side-effecting in essence. This is well documented all over, but rather what is the "Essence" of the solution taken in FP (independent of how complicated it is to implement it)