Hacker News new | ask | show | jobs
by zelphirkalt 1444 days ago
You are correct in general about FP. I am talking about introducing FP in an existing OOP program though. You might want to use existing parts, but they are usually all impure, with lots of side effects. Any function in which you use those existing parts will be impure as well, unless you resort to things like IO monad. However, that makes it more complicated to implement things. You are building another layer of protection from the existing code and its state mutations everywhere.
1 comments

I was actually talking about learning, rather than introducing to an existing codebase. But good points anyways.