3 ms·
Valid points, but not _the_ point. There is a big difference between allowing and supporting something. OO languages _support_ hidden inputs and outputs as we
by serichsen 9y ago
Valid points, but not _the_ point. There is a big difference between allowing and supporting something.
OO languages _support_ hidden inputs and outputs as well as programming by mutation. They _allow_ programming in a functional style, but you will have to be inventive for it.
FP languages _support_ immutable values, referential transparency and all that. They _allow_ programming by mutation and hidden inputs and outputs, but you will have to be (sometimes very) inventive for it.
- regulation_d 9y agoExactly. Starting points matter. And for me, a starting point of "enforces immutable data" is a good one.
- horrido 9y agoStarting points matter, but this depends on the programming situation. That's why you use OOP or FP where it is most appropriate or suitable. Neither OOP nor FP is a panacea. Neither OOP nor FP is the universal programming tool.
- horrido 9y agoNothing prevents an object's methods from being referentially transparent. It just depends on how you choose to write them.