Re:Avoid getters and setters whenever possible
by rhapsodic on Thursday March 22, 2018 @07:45AM
(#16647733)
> It degrades the concept of objects being smart independent entities.
"Smart independent entities"? That's a new one on me. What does that mean?
Re:Avoid getters and setters whenever possible
by frou_dh on Thursday March 22, 2018 @08:13AM
(#16647896)
An object graph operating more like a network of tiny special-purpose computers with I/O (messages/method-calls). Rather than occupants that are conscious of being not much more than rectangles in a single memoryspace. Alan Kay also made analogies with cell biology.
Setter methods are 95% the same as direct mutation of encapsulated state. It degrades the concept of objects being smart independent entities.