On Wed, Jun 20, 2012 at 5:06 PM, Jeremy Bopp <jeremy / bopp.net> 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.  What else is there?
>
>
I suppose that's the biggest area of concern for me.

I do sometimes want to perform stringlike operations, e.g., on the parameter
into method_missing, but that merely requires a single to_s. Likewise I
sometimes
want to add an equal sign onto a symbol in metaprogramming:

    (name.to_s << "=").to_sym


Hal