Re: Clean Object Class Design -- Circle/Ellipse

From: Richard MacDonald <macdonaldrj_at_att.net>
Date: Sun, 19 Aug 2001 02:13:34 GMT
Message-ID: <ihFf7.22246$1p1.1734607_at_bgtnsc04-news.ops.worldnet.att.net>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:qoDf7.73$__4.18646133_at_radon.golden.net...
>
> >What does one gain by deriving Integer from Rational?
>
> What does one gain by not deriving integer from Rational? What does one
> lose? How does one's decision affect integer values in the least --
> including their subtype/supertype relationships with other numeric types?
>
This one is easy. Take a look at the Smalltalk Number classes. Integer and Real inherit from Number. Try inheriting Integer from Real and see what a mess you've made.

A few decades of experience have given us the answer. Back to you guys to figure out the correct theory :-) Received on Sun Aug 19 2001 - 04:13:34 CEST

Original text of this message