As Oscar said, it's an style question. I prefer to reference directly the instance variable in this context and don't expose private state, and also prefer to put the instance variables definition in the concrete classes and not in the abstract ones.
Regards, Gabriel On Wed, Oct 21, 2009 at 6:45 AM, Gerben van de Wiel <[email protected]>wrote: > Hi, > > I am very new to Pharo and Smalltalk in general. When reading through > the excellent PBE book i was wondering about something on page 32. > In that piece of code the LOCell class is using some instance > variables from it's super classes, and i was wondering if it isn't > best practice to use > message to self using the accessing methods so instead of. > > bounds := 0...@0 corner: 1...@16. using self bounds: (0...@0 corner: 1...@16). > > or is good to use both or is there something i don't know (maybe it is > faster to use instance vars then sending a new message and traverse > the inheritance tree). > > regards, > > Gerben van de Wiel > > _______________________________________________ > 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
