"Florian Gross" <flgr / ccan.de> wrote in message
news:31mf3tF3ebu1mU3 / individual.net...
> itsme213 wrote:
>
> > I was talking about the pure object model part of Ruby. In such a pure
> > object model, a[1] and a[2] are instance variables (some Smalltalk
> > descriptions calls these 'indexed instance variables' as opposed to
'named
> > instance variables'). How something is optimized in C is a different
matter.
>
> Please call this Object state ("as in a[1] and a[2] are part of Object
> state" / "@foo is part of Object state") instead. It's a more general
> term and seems to already be well-established.

Perhaps.

Though it's hard to say "object x has states a, b" when you mean "object x
has instance variables a, b".  Or "object x has states 1, 2, 3" when you
mean "object x has indexed variables (indices?) 1, 2, 3".

Object#each_instance_variable  ?
Object#each_state ?
Object#each_slot ?

It's not a big deal, but a  common term would be nice.