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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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-03 09:23:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!newshub2.home.com!news.home.com!news.mindspring.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: 'withing' problem Date: Sat, 03 Nov 2001 09:27:28 -0800 Organization: AdaWorks Software Engineering Message-ID: <3BE42900.7590E899@adaworks.com> References: <3be27344$0$227$ed9e5944@reading.news.pipex.net> Reply-To: richard@adaworks.com NNTP-Posting-Host: 9e.fc.cc.9f Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 3 Nov 2001 17:23:20 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:15742 Date: 2001-11-03T17:23:20+00:00 List-Id: Simon Wright wrote: > If you are coming from a UML-based modelling environment, > cross-dependency is entirely natural. It would be quite wrong to > contort the model to cope with Ada's unfortunate limitations in this > respect. Funny. I don't regard the current context clause (with) as a problem, when one is designing in Ada. It is most certainly not an "unfortunate limitation." Rather, the grumbling about it most often reflects a lack of understanding, or acceptance, of the very strict visibility rules of the language. As to the potential for circular context clauses, these need not exist when one correctly designs in Ada. When I first learned Ada, what seems now many lifetimes ago, I was annoyed by the recurring errors I would have due to visibility issues. The compiler kept bothering me with nasty messages about this. In time, I came to appreciate that one of Ada's primary strengths is in is separation scope and visibility. Now I realize that those visibility rules are essential in reasoning about good design. More Ada programmers have problems with visibility rules than with any other feature of the language. Some will go for years, designing and coding in Ada, and never come to terms with the visibility rules. I am reminded of first learning to use a rotating brush floor buffer for a part-time job in high-school. The brushes rotate over the floor in their own way. When I struggled to overpower the rotating brushes, I could not succeed. Once I learned how to balance the brushes lightly, and guide them across the floor according to their own behavior, I could control the machine with one finger. Struggling with the context clause and visibility rules is much the same. Learning to use those rules, they make the Ada software design process easy and fun. Try to defeat them and the process is hard and unpleasant. Richard Riehle