From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99f33f51845a7793 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-05 12:37:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed1.uncensored-news.com!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3be27344$0$227$ed9e5944@reading.news.pipex.net> <3BE42900.7590E899@adaworks.com> <3be65f4c$0$237$ed9e5944@reading.news.pipex.net> Subject: Re: 'withing' problem Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 05 Nov 2001 15:36:52 EST Organization: http://www.newsranger.com Date: Mon, 05 Nov 2001 20:36:52 GMT Xref: archiver1.google.com comp.lang.ada:15846 Date: 2001-11-05T20:36:52+00:00 List-Id: In article <3be65f4c$0$237$ed9e5944@reading.news.pipex.net>, David Crocker says... > >OK, so if you think cross-dependency reflects bad design when the >implementation language is Ada, can you tell me how you would redesign the >Doctor/Patent/Insurer example in >http://home.bluemarble.net/~jvolan/WithingProblem/FAQ.html ? Make a new class called "symptom", which the doctor treats, and the patient has. Make another new class called "insurer", which the doctor bills and the patient has (and periodicly pays into). When a patient calls Visit_Doctor, they pass in their symptom(s) and their insurer. Circular dependancies are just as bad an idea in OO control flows as they are in traditional logic control flows. Think about what used to result back when people made their own loops using all sorts of interrelated goto's. When designing you should be looking for hierarchy and structure, not just any old path through your objects that seems to work. I understand that in early OO, objects each had their own control (like threads). If this were the case today we wouldn't even be having this conversation. You are trying to make multiple objects both servers and clients with each other, which is a perfect design for deadlock. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.