Hal F. wrote:
Well, what if you want to add a new method to the class? That
method should have the right to use the instance variables.
It does, if there are any.
But in a Struct there aren’t any.
Must a class have instance variables to be a ‘real’ class?
Why does the use of an array or hash, as the sole instance variable,
seem (if I’m following this correctly) to disqualify a class as a ‘real’
From the outside, objects simply respond to messages. On the inside,
they do stuff when sent a message. Sometimes the outside and the inside
match up (where you get the Ruby version of public properties), but
there’s no reason they have to, and no reason to assume it is the
should not lead one to think that obj implements an instance var @foo.