2 ms·
Encapsulation doesn't make this problem go away at all -- it just replaces interface proliferation with secretive state. I don't like having state spread everw
by blasdel 17y ago
Encapsulation doesn't make this problem go away at all -- it just replaces interface proliferation with secretive state.
I don't like having state spread everwhere, but I hate being lied to about it.
- joe_the_user 17y agoEncapsulation can an excellent step in making a problem go away. First a mistake is made all over your code. Then it's made only in the private method. Then it can be changed easily -- and reverted easily if the change doesn't work. Of course, this isn't always a good idea. But there are many times that it can be a good idea.