2 ms·
> Object oriented programming is a perfectly reasonable way to organize a code base and the basics provide for good encapsulation. It should be understood as w
by bluetomcat 4y ago
> Object oriented programming is a perfectly reasonable way to organize a code base and the basics provide for good encapsulation.
It should be understood as what it is - an organisational paradigm over procedural programming. The basic building block of OO programs is still the procedure with some local and global state. OO lets you bundle procedures together in groups, associate them with mutable state, and call them (statically or dynamically-bound) via the static type system.
- kaba0 4y agoI mostly agree (and taming mutations is likely the reason for its widespread adoption), though there is no reason why it can’t be paired with FP, or at least restrict mutations to an object’s internal private state.