4 ms·
"It’s the closest to side effect free programming you can get in OO." No, you can still have side effect free programming in OO. All of the techniques for prog
by procrastitron 18y ago
"It’s the closest to side effect free programming you can get in OO."
No, you can still have side effect free programming in OO. All of the techniques for programming without using mutable state are language agnostic and should carry over to whatever OO language you are using. You might have problems in languages that lack tail-call optimization, but even that can usually be worked around by using folds.
Now, I'm not claiming that it's feasible to make an entire app in (for instance) Java purely functional, but you can definitely build the majority of your app/library/whatever without using mutable state.