# Re: Does an instance know his own name?

**URL:** <https://www.ruby-forum.com/t/re-does-an-instance-know-his-own-name/67461>\
**Category:** Ruby\
**Created:** [September 4, 2006, 2:44pm UTC](https://www.ruby-forum.com/t/re-does-an-instance-know-his-own-name/67461 "2006-09-04T14:44:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 4, 2006, 2:44pm UTC](https://www.ruby-forum.com/t/re-does-an-instance-know-his-own-name/67461/1 "2006-09-04T14:44:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 5, 2006, 1:16am UTC](https://www.ruby-forum.com/t/re-does-an-instance-know-his-own-name/67461/2 "2006-09-05T01:16:36Z")

</div>

On 9/4/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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.denhaven2.com/](http://talklikeaduck.denhaven2.com/)
