logo       

Accessors: msg#00088

lang.smalltalk.squeak.beginners

Subject: Accessors

I've been using accessors for every instance variable, and even using them internally.

I have to admit, because of the need to preface every method call with "self", it makes the code look less clean.

I've also ended up with what seems to be an odd construct:

clear
self myCollection removeAll: self myCollection

Part of this is the self thing:

myCollection removeAll: myCollection

and the other part is...I guess, not being able to find a "clear"

Thanks for all the feedback guys. Very helpful.

I've been too lazy with my Smalltalk (thinking) in the past and this has helped a lot.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise