From: Henry Maddocks Date: 2012-06-21T05:58:04+09:00 Subject: Re: Symbols and Strings... On 21/06/2012, at 8:50 AM, Bartosz Dziewoński wrote: > 2012/6/20 Henry Maddocks : >> >> On 20/06/2012, at 7:12 PM, Robert Klemme wrote: >> >>> If at all >>> the inheritance would be the other way round: a String is-a Symbol and >>> it would extend the contract by mutating methods. >> >> This is a very good point. String should be a sub class of Symbol. I wonder if this was considered. > > This is an extremely bad idea. Well a lot of people, including Matz, disagree with you. > > Symbol is just that – a symbol. Internally it is stored as a *number* > and in C code passed by-value, like Fixnum, instead of by-ref, like > all other objects. It is only shown as a bit of text for display. The internal representation is of no concern to the programmer, only it's utility. There seems to be a desire to be able to use String and Symbol interchangeably, hence this discussion. Henry