It definitely is a time saver when debugging as you don't have to search for multiple occurrences of a variable being set in order to halt.
I think of it as another form of encapsulation. Within a class itself all references to a variable would go through it's accessors for referencing. Kent Beck pattern #?? in his Smalltalk Best Practice Patterns book has a bit of a discussion on the merits of this approach. Maybe it's just a style thing and I should drop it though :) On Thu, May 14, 2009 at 1:14 PM, Alexandre Bergel <[email protected]>wrote: > I kind of agree with Steve, however, it is hard to see how this will > increase the quality of source code. > > Alexandre > > > On 14 May 2009, at 19:10, Cameron Sanders wrote: > > > > > That is not always the best policy. If you provide public accessors > > for your private model elements (representation), the next thing you > > know people start using them! And then your model interfaces is > > constrained. > > > > ? or am i just talking trash ? > > > > > > On May 14, 2009, at 12:55 PM, Steve Wirts wrote: > > > >> Hi Folks, > >> > >> Would it be inappropriate to request that an effort be made at some > >> point to try to provide accessors for all instance/class instance > >> variables, and try to get rid of inappropriate direct variable > >> accessing where possible? > >> > >> The "chasing variables" function is handy but seems more cumbersome > >> than just putting a halt in a setter. > >> > >> I know this would be a lot of work but maybe it could be automated. > >> > >> Just tell me to shut up and go away if I'm being a nuisance. > > > > Oh, and please stick around... to draw attention away from my pesky > > questions. > > > >> > >> > >> Steve :) > > > > > > -cam > > > > _______________________________________________ > > Pharo-project mailing list > > [email protected] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
