Dear all,
This is one of the two design points ( the other is about Null Objects ), that were coming nagging at my mind ;-)
I think giving set/get harms encapsulation ;-) Some code could erroneously set only one of them and take the object in a wrong state ( One way to look at objects is that they model states ;-)
Instead, I think we should look at what the outside code is doing with these get / set and
remove these set / get
push that operation to the object ( it could internally use setters / getters and always maintain a coherent state )
Some Get operations are ok ( like name() ) but things like setTtl()/ttl() maybe are not, IMHO ;-)
What do you all think?
—- cheers atul
