Newsgroups: comp.lang.c++,comp.object,comp.theory,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!news.sprintlink.net!news-peer.sprintlink.net!uunet!in1.uu.net!128.100.1.3!utcsri!info.ecf!doylep
From: doylep@ecf.toronto.edu (Patrick Doyle)
Subject: Re: Opinions on Ellipse-Circle dilemma?
Sender: news@ecf.toronto.edu (News Administrator)
Message-ID: <E5IB0A.FpE@ecf.toronto.edu>
Date: Wed, 12 Feb 1997 20:16:58 GMT
Distribution: inet
X-Nntp-Posting-Host: spark21.ecf
References: <5d4fmf$7gk@bagan.srce.hr> <E5B2HH.8AH@ecf.toronto.edu> <E5EMwz.74K@undergrad.math.uwaterloo.ca> <01bc183f$67b8c5a0$543db6cc@victor.imsisoft.com>
Organization: University of Toronto, Engineering Computing Facility
Lines: 33
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:247473 comp.object:61054 comp.theory:17919 comp.lang.smalltalk:51481

In article <01bc183f$67b8c5a0$543db6cc@victor.imsisoft.com>,
Victor Bazarov <vbazarov@imsisoft.com> wrote:
>
>No, of course not. I ask you please to excuse me, if I am completely out of
>the field in Smalltalk. But consider this:
>
>(more like pseudocode)
>
>CLASS Ellipse:
>	VIRTUAL METHOD setAxesLength( real major, real minor ) PURE
>
>Implementation:
>	Ellipse::setAxesLength(...) { ... }
>
>CLASS Circle: SUBCLASS Ellipse
>	VIRTUAL METHOD setAxesLength( real major, real minor )
>
>Implementation:
>	Circle::setAxesLength(...) { if (axes same) set radius; else do nothing }

  Hmm...  Sorry, I don't like that one too much.  I tell it to change
axes and it chooses to ignore me without so much as a peep?  That
sounds like it could hide a flaw in my logic pretty effectively.  If
you're going to do it this way, it should be documented that this function
"changes the axes of the ellipse, or does nothing if unable to comply"
because (at least in my programs) inaction is not the normal response to
failure.

 -PD
-- 
--
Patrick Doyle
doylep@ecf.utoronto.ca
