3 ms·
We 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
by klodolph 11y ago
We 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.