3 ms·
Gaming and applications that require extreme performance is the only application where Fp doesn’t work well. > But it's not even mainly about performance. The
by ninetyninenine 2y ago
Gaming and applications that require extreme performance is the only application where Fp doesn’t work well.
> But it's not even mainly about performance. The structure of the code changes with every requirement change. In a non-artificial code you're doing stuff other than calculating the result, and all the associated state and dependencies now have to be passed to 4 different loops.
No. I’m saying the initial design needs to be one loop for every module. You then compose the modules to form higher level compositions.
If you want new operations then all you do is use the operations on intermediary state.
That’s how the design should be. Your primitive modules remain untouched through out the life cycle of your code and any additional requirements are simply new modules or new compositions of unchanged and solid design modules.
- DeathArrow 2y ago>Gaming and applications that require extreme performance is the only application where Fp doesn’t work well. Sure, if you are considering pure functional programming. But neither pure functional OOP does work well in a performance context. If you mix imperative/procedural and functional programming you can have clarity, ease of use, ease of change and some performance, too.
- ninetyninenine 2y agoEach has its trade offs you lose clarity, ease of use, ease of change and performance even when you mix all styles.