Re: Clean Object Class Design -- Circle/Ellipse
Date: Tue, 09 Oct 2001 13:49:02 +0100
Message-ID: <3BC2F23E.72162826_at_dmu.ac.uk>
Bob Badour wrote:
>
> Graham Perkins <gperkins_at_dmu.ac.uk> wrote in message news:<3BB8485E.41A7EE55_at_dmu.ac.uk>...
> > But it does apply. If we model the *mathematical* concept of an
> > ellipse as an Ellipse class in OO, then there is no problem whatsoever
> > doing the same with Circle, and preserving the *mathematical* sub-type
> > relation as an OOP subclass relation. The very real and natural
> > subtype/supertype relationship between circle and ellipse does indeed
> > apply in OO.
> >
> > Where things go wrong is when people try to add the notion of
> > procedural state.
>
> IE. When people confuse values and variables as I have been saying.
> Variables have procedural state, while values do not. In fact, the
> instantaneous value of a variable determines its state.
>
> The solution is very simple: Properly distinguish between value and
> variable.
.. which most of us do. ESPECIALLY in smalltalk, which you were keen to rant at great length about. The variable/instance distinction could not be clearer. I've skipped a lot of this thread. Did you ever retract your wild allegations about smalltalk?
> > I find it very telling that almost every OO critic has found...
> What OO critic? Can you point to a single instance of an OO critic
> attacking OO on the basis of poor handling of procedural, mutable
> state? I have yet to see such an attack.
I was parodying your original wording. As it happens, a simple search for ellipse, circle, rectangle, and square on comp.object will turn up reams of criticism based on confustion between circle as a mathematical VALUE object and Circle as a computer-graphical STATEFUL object. Received on Tue Oct 09 2001 - 14:49:02 CEST