4 ms·
Sure, not all FP languages provide encapsulation, and neither do all OO languages (e.g. in Ruby there's always some way to access an object's private parts). M
by andrenth 7y ago
Sure, not all FP languages provide encapsulation, and neither do all OO languages (e.g. in Ruby there's always some way to access an object's private parts).
My point was simply that the nice property you described can be achieved by using ADTs, and you don't need OO to have that.
- protomolecule 7y agoI think there is a difference between having a way to bypass encapsulation and deliberately not having encapsulation at all. Otherwise I agree with you.