Hi --

On Fri, 6 May 2005, Eric Mahurin wrote:

>>> The original intent was to have a way to modify these
>>> references that variables contain.  This provides a general
>> way
>>> of doing this.
>>
>> Doesn't assignment do that?
>
> Of course.  But the code doing this assignment has to know the
> name of the variable and the binding(scope) it is in.  This
> class encapsulates this information and gives get/set methods
> to this variable (or thingy).
>
> To not confuse this with "object reference" (which is many
> times interchangeable with "object"), you could think of this
> thing as a variable/attribute/member/element/thingy reference.
> Or even a reference to "object reference".  It also corresponds
> directly with the phrase "pass by reference".  And it maps to
> what references/pointers are in other languages.

I don't think I'm confusing it.  variable/attribute/...thingy confuses
me, though, so maybe that counts :-)  It calls to mind the Perl
"underlying thingy" concept, which I think is a reasonable way to
explain objects in Perl but not necessarily something I'd want to
emulate in Ruby.  As you say, one would never literally need it.  But
I'd still be interested in seeing cases where it would add clarity and
structure to a design.  (Yes, you detect a note of skepticism :-)  But
it's all academic, as they say.)


David

-- 
David A. Black
dblack / wobblini.net