4 ms·
> Binding data and functions together beats operating on global data visible to everything. One of the big wins of OOP is less exposed global data. “Passing st
by weberc2 8y ago
> Binding data and functions together beats operating on global data visible to everything. One of the big wins of OOP is less exposed global data.
“Passing state as parameters” is what solved the “everything operating on global state” problem. Binding functions and state permitted polymorphism/abstraction.
> Multiple inheritance is seldom worth the headaches.
Single inheritance is never worth the headaches. :)
> Objects are probably more useful than some of the things invented to replace objects, like "traits".
Traits don’t replace objects; they are interfaces with static dispatch semantics.
- humanrebar 8y agoThere are so many kind of polymorphism. Many of them do not require objects. Executing a closure is a form of polymorphism. As is manipulating a generic type.
- weberc2 8y agoAgreed, but objects are the implementation used in OO. (My point was not that they are the only implementation).
- stOneskull 8y ago'why inheritance sucks' is a good topic