On Wed, 12 Feb 2003 dblack / candle.superlink.net wrote:

> Keep in mind that my point has nothing to do with advocacy of
> inheriting from String.  It's about what happens when one *does*
> inherit from String.  The "whether to do it" question is very
> interesting to me (I started a thread on precisely that question on
> ruby-talk yesterday), but it's tangential to the question under
> discussion here.
> What you're saying amounts to: if I can't think of a
> really great example of this, then anyone who does it deserves to have
> the core language shift under their feet.

Although I think my point was worth making, I think it's also true that
language semantics shouldn't change all of the time.

But I'd still like a good example of String inheritance =) no need for a
really great one, just a good one... (I've already given you an idea of my
criteria...)

Btw I've run into similar problems two years ago when designing MetaRuby,
because it happens to ease subclassing of Array/Hash/String... by making
imitations thereof that are more productively subclassable. It's still in
the TODO list of MetaRuby because I didn't really know what to do with
it (it looked like a difficult problem). I'm not sure I posted on
ruby-talk about it.

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju