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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a270a1fc28d4f812 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-28 15:56:46 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsxfer.visi.net!154.32.99.10.MISMATCH!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: OOD in Ada? Date: Fri, 28 Jun 2002 09:09:36 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1025269777 18546 136.170.200.133 (28 Jun 2002 13:09:37 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 28 Jun 2002 13:09:37 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:26777 Date: 2002-06-28T13:09:37+00:00 List-Id: O.K. I understand where you were going with it now. I'd agree that trying to make everything in a parse tree as you describe it use the type system to try to guarantee correctness is a bad idea. Attempting to do so is only likely to lead to fighting with the compiler endlessly & for little advantage. Better to have the parser logic insure that only a correct parse tree gets built & use a more loose level of type checking on the access types. It still leaves a hole in that someone could derive from the base class and succeed in getting something into the parse tree that is incorrect - but doing so would require some rather deliberate moves. The answer can be "Then just don't do that!" because it isn't likely to happen just by an accidental coding error. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com wrote in message news:fKIS8.801$X14.133162217@newssvr13.news.prodigy.com... > I presume the OP wants to have things along the line of > > type Adding_Operator is tagged record ... > Op_Char : character; > end record; > type Simple_Expression is tagged record> Left : Access_Simple_Expression; > Add_Op : Access Adding_Operator; > Right : Access_Term; > end record; >