From: Charles Oliver Nutter Date: 2007-10-01T11:21:03+09:00 Subject: Re: a = Dog.new # a is not a pointer and not a reference? SpringFlowers AutumnMoon wrote: > hm,... but is there a problem to think of reference in Ruby as a > "pointer"? will that cause any trouble? I only see that a.value is > not the same as C and C++ would use a->value, but in Ruby we use the "." > to replace the "->" and that's it. Will there be further trouble or > discrepancy to think of Ruby reference as a pointer? Ruby variables hold the value of an object reference. Reassigning the variable set it to a different object reference. Retrieving the value gives you an object reference you can then pass by value to another method or use to invoke methods on the object. Pointers are lower-level. You can't do pointer math with Ruby variables, and you can never retrieve the memory address of an object, so thinking of Ruby variables as pointers is misleading. - Charlie