On Thu, Jun 21, 2012 at 12:25 AM, Hal Fulton <[email protected]> wrote:
>
> On Wed, Jun 20, 2012 at 5:06 PM, Jeremy Bopp <[email protected]> wrote:
>>
>> So then, in what cases would it be helpful to use them interchangeably?
>>  Is it possible to define a common, useful interface that both Symbol
>> and String could implement.  If so, perhaps a class or module could be
>> defined for that interface and incorporated into both classes as
>> appropriate.
>>
>> From what I've seen, the most frequently voiced desire is to be able to
>> use apparently equivalent symbols and strings as fully equivalent hash
>> keys.

Even that would not be solved by inheritance because instance of
different classes can never be equivalent.

Kind regards

robert

PS: I said "If at all..." - so I am not a fan of String as subclass of
Symbol either.

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to