From: Josh Cheek Date: 2010-06-17T04:23:40+09:00 Subject: Re: Getting rid of self --0016367fbb5397337504892aa854 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jun 16, 2010 at 1:45 PM, Rein Henrichs wrote: > Just set the instance variables yourself. Stop replacing clear, explicit > code with metaprogramming magic that you can't understand the day after you > write it. > The original post did not use instance variables, so there is no way to know that the "self.step = 0" is the same as "@step = 0". Hence my explicit decision to make sum_of_income a method which must perform calculations, and accesses an ivar that is not named after the method. Besides I think that is not something you should do, because it means you are accessing ivars all over the place, which couples implementation. If you always use the setter, then you have a gate keeper to that var, and can easily change implementation later, without having to go hunt down all the places you used the ivars. --0016367fbb5397337504892aa854--