Ruby on Rails Sunday, July 31, 2011

> 3. I didn't understand your justification of getter and setter.Since
> instance variables work fine why would you need to define a setter and
> getter.

>>Because it's good programming practice.

Ok, I took my own advice an read some articles about 'why getter and
setters' and there are enough people that think it's actually bad
programming practice. But as far as I can tell the reasons I stated are
why the book is is using getters and setters--however, the book does not
always use the getters and setters, so it is being consistent.

Posted via

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment