4 ms·
"Lots of so called object oriented languages have setters and when you have an setter on an object you turned it back into a data structure." That may be becau
by fauigerzigerk 15y ago
"Lots of so called object oriented languages have setters and when you have an setter on an object you turned it back into a data structure."
That may be because data structures is what we actually need. Data structures largely determine the computational complexity of operations and I think it makes little sense to act as if we could always think in terms of abstract responsibilities, interfaces, encapsulation, message passing, etc.
These things are useful organizational principles for coping with large systems, but at the core of most large systems is some algorithmic transformation of one data structure into another.
- xyzzyz 15y agoI think that the point here is that while data structures are objects, not every object should act like a data structure.
- fauigerzigerk 15y agoThat's a much better way of putting it than the original quote.
- groovy2shoes 15y agoKeep in mind that when Alan Kay says "object" he means something different from programmers-at-large. To the general population of programmers, an object is just a data structure that's been bundled with some behavior. To Kay, an object is a computational entity that can only send/receive messages (what Carl Hewitt called an actor even before Smalltalk was on the scene). In Kay's mind, objects do not expose state the way they commonly do in the mainstream.