Re: a = Dog.new # a is not a pointer and not a reference?
- From: "Robert Dober" <robert.dober@xxxxxxxxx>
- Date: Sun, 30 Sep 2007 19:01:38 +0900
On 9/30/07, SpringFlowers AutumnMoon <summercoolness@xxxxxxxxx> wrote:
how about just a.set_value(3) vs a->set_value(3). what i mean is justYup 'cause '.' is not dereferencing period (pun intended). It is
the "." and "->" difference. using a "." in Ruby and "->" in C or C++.
If I think of "a" as a pointer and "." as "->", will that get in trouble
and have any discrepancy for other things.
sending a message
x.a is almost equivalent to
x.send :a.
Variables in Ruby are references, period again ;) but you cannot
dereference them.
I guess this was somehow lost in the discussion.
HTH
R.
--
what do I think about Ruby?
http://ruby-smalltalk.blogspot.com/
.
- Follow-Ups:
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: David A. Black
- Re: a = Dog.new # a is not a pointer and not a reference?
- References:
- a = Dog.new # a is not a pointer and not a reference?
- From: SpringFlowers AutumnMoon
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: Morton Goldberg
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: Austin Ziegler
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: SpringFlowers AutumnMoon
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: SpringFlowers AutumnMoon
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: Morton Goldberg
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: SpringFlowers AutumnMoon
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: Morton Goldberg
- Re: a = Dog.new # a is not a pointer and not a reference?
- From: SpringFlowers AutumnMoon
- a = Dog.new # a is not a pointer and not a reference?
- Prev by Date: Re: Can you please help to make decision?
- Next by Date: Re: Can you please help to make decision?
- Previous by thread: Re: a = Dog.new # a is not a pointer and not a reference?
- Next by thread: Re: a = Dog.new # a is not a pointer and not a reference?
- Index(es):
Relevant Pages
|