On Thu, Apr 7, 2011 at 5:11 PM, Robert Klemme
<shortcutter / googlemail.com> wrote:
>
> But we were talking about the case of Complex inheriting Float.  > arguments do not make sense with a Float class because there is no
> imaginary part yet you would need them in order to be able to provide
> a meaningful to_f in the subclass Complex.

That's why Complex adds to #to_f, to enable the #to_f functionality
(or raise an error, when it just doesn't make sense to have a
function). It's method overloading.

> Thank you for the interesting discussion!

My pleasure. :)

We can probably go back and forth over the benefits of the approaches,
but it's largely academical now, I think. ;)
> PS: I just read that there was another earthquake in Japan and there
> is a tsunami warning.        > I hope these catastrophes end rather sooner than later.

Aye.

-- 
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.