On Wed, Jun 16, 2010 at 1:45 PM, Rein Henrichs <reinh / reinh.com> 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.