From: Simon Krahnke Date: 2007-10-01T23:05:05+09:00 Subject: Re: a = Dog.new # a is not a pointer and not a reference? * SpringFlowers AutumnMoon (2007-09-29) schrieb: > when we say > > a = Dog.new("lulu") > > Now a is not really a pointer, �a� is a variable. A variable is never a pointer. A variable is always a name for something in some scope. In C and C++ a variable is a name for a location in memory. Variables have a type that tells the C Compiler what to do when the variable is used. [1] In Ruby a variable is a name for an object. You can call this a reference but just as well stick to �variable�. When a variable name is used as an expression, the expression's value is the object the variable is a name for. > When we use a.color, it is like a reference in C++ implicitly > dereference it and use its attributes. Ruby is not an alternate syntax for C++. mfg, simon .... l [1] I am a human. I don't quite know what a C++ reference is.