Randy Kramer
10/9/2007 11:43:00 AM
On Tuesday 09 October 2007 12:45 am, Morton Goldberg wrote:
> On Oct 8, 2007, at 10:38 PM, M. Edward (Ed) Borasky wrote:
>
> > In Pascal, "a := b" is normally read as "a becomes b". So in Ruby,
> > I would translate "a = b" as "a becomes a reference to b".
>
> It's more "a becomes a reference to the object b is referencing", or
> better yet "a is now bound to the same object as b [is bound to]". My
> suggestion identifying "=" with the English copula is very tentative.
> It's probably futile to try to force English syntactic terminology
> onto Ruby.
(A newbie (or slow learning oldbie) lurker chiming in): If you're a *nix
user, a way of thinking about it that seems to help me (because I think now I
finally am beginning to understand it) is as analogous to a hard link in
Linux--a and b are alternate names for an object, and a = b is the act of
creating the alternate name a.
So maybe (I'm thinking about this) I'd read a = b as one of:
* create a new name a for b
* (hard) link a to b
* ???
(I call it a hard link instead of a soft link because I think the hard link is
a closer analogy.)
Randy Kramer