News for hackers. Stuff that matters.
Re:Functional programming is finally going mainstream by zelphirkalt on Wednesday July 13, 2022 @11:45AM (#32084300)
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.
Re:Functional programming is finally going mainstream by Akronymus on Wednesday July 13, 2022 @12:44PM (#32085220)
I was actually talking about learning, rather than introducing to an existing codebase. But good points anyways.