[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Does an instance know his own name?

marinho.tobolla@syncity.de

9/4/2006 6:08:00 AM

I think the problem with an instance knowing his own name is the possibility of an instance having more than one name. How whould the instance now, which name you want ? The object id on the other hand is afaik sort of unique.

Marinho



1 Answer

Rick DeNatale

9/4/2006 11:13:00 PM

0

On 9/4/06, marinho.tobolla@syncity.de <marinho.tobolla@syncity.de> wrote:
> I think the problem with an instance knowing his own name is the possibility of an instance having more than one name. How whould the instance now, which name you want ? The object id on the other hand is afaik sort of unique.

Yep.

For those old enough, and American enough to remember the comic Bill Saluga.
# You can call Nephew.new...
Ray = Jay = Johnny = Sonny = RayJay = RJ = Nephew.new
# but ya doesn't hafta call it Johnson

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...