[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: str1 = str2 is not a copy?!?

Gavin Kistner

11/2/2006 10:12:00 PM

From: Louis J Scoras [mailto:louis.j.scoras@gmail.com]
> On 11/2/06, Gavin Kistner <gavin.kistner@anark.com> wrote:
> > The thing to wrap your head around here is that 'slots' in
> an Array, and
> > the values in Hash objects, are very much like variables.
> They point to
> > values, they do not contain them.
>
> Of course. I'm just pointing out how this could be confusing to
> someone who is new to ruby. Same sort of thing with the other thread
> floating around about mutator methods.

Yup. To be clear, my response was not an attempt to 'correct' you, but
rather to help form a good mental model for anyone who might not be
clear what was going on in your example.

1 Answer

Louis J Scoras

11/2/2006 10:28:00 PM

0

On 11/2/06, Gavin Kistner <gavin.kistner@anark.com> wrote:

>
> Yup. To be clear, my response was not an attempt to 'correct' you, but
> rather to help form a good mental model for anyone who might not be
> clear what was going on in your example.
>

Absolutely. Your explanation was excellent, as always. What I meant
was, although it may seem quirky at first, eventually the realization
comes that it's better this way.

One only has to try out writing some C code for a while to see what
they're missing =)


--
Lou.