3 ms·
> Messages: Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages. "Computing ... as an intrinsic
by ExpiredLink 11y ago
> Messages: Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages.
"Computing ... as an intrinsic capability of objects" - I'd call this the basic misconception of OOP.
- brudgers 11y agoWhy would you call it that? I don't understand.
- klodolph 11y agoWe typically divide programs into data structures and code. The problem with combining them into objects is that there is often code that does not correspond to a single data structure. "Kingdom of nouns" talks at length on the subject. But basically, "object" as "code plus one data structure" is not a design panacea.
- zwieback 11y agoOf course it's not as bad in SmallTalk as it is in Java, to use those two as stand-ins for dynamic vs. static typing and I would change your comment to "The problem with combining them into classes is..." In SmallTalk I would write code that operates on any object that can respond to some set of messages so the coupling is much looser.
- jowiar 11y agoI think you've got it wrong. The degenerate case of this is that you've one object, called a "Computer", which can "compute". We live in a world. It has state. Something needs to manage, check, and hold the state. It's sometimes easier to conceptualize a problem by pretending that state doesn't exist, but it's an abstraction that leaks badly for anything that does not exist in isolation from the world. The misconception that wrecks OOP in the eyes of many is that OOP == "Class Hierarchy". OOP = "Objects" and "Messages". Everything else is negotiable.