3 ms·
> As someone who had to maintain two applications written entirely using the FRP Paradigm (Rx in Kotlin/Swift with a heavy focus on FRP principles), I am fascin
by josteink 4y ago
> As someone who had to maintain two applications written entirely using the FRP Paradigm (Rx in Kotlin/Swift with a heavy focus on FRP principles), I am fascinated the idea but I absolutely hated the experience.
I had a similar experience maintaining and reviewing an Angular+Typescript application at work. I was fascinated about RX and was looking forward to see it in action.
In practice Angular exposes everything from its internal framework and interfaces as Observables, making RX everywhere the default.
The simplest things became mindbogglingly complex and asking “what does this code actually do” became the most frequent code-review question.
When we were unable to get the application stable, I made a renegade effort to eliminate all Observables and replace them with standard, well-understood Promises instead.
The result was fewer lines of code, clearer code, fewer bugs and more tests as bootstrapping/mocking a Promise-based API is significantly less effort than doing the same for its Observable-based counterpart.
It was a terrible experience all over and realistically (given the choice) I’ll never touch an Angular or RxJS based app ever again. My team will just touch React for any new development from now on.
- hnthrway 4y ago>I made a renegade effort to eliminate all Observables and replace them with standard, well-understood Promises instead. Wow. You would have been better off ditching Angular entirely, or sucking it up.
- josteink 4y agoYou’re downvoted but entirely right. Unfortunately I didn’t have the time nor management buy-in for doing that (a full rewrite), so instead I went for the second best option, which was making the code we had at least manageable.
- spiffytech 4y agoA friend had the same experience with Rx in Angular. Simple things were crazy complicated, and everything was hard to understand. He did the same thing: ripped out all the observables and replaced them with Promises and async/await. He loves how much it simplified things.