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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9629eba26884d78 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-31 06:10:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!nntp-server.caltech.edu!hammer.uoregon.edu!arclight.uoregon.edu!newsfeed.mathworks.com!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!cyclone.swbell.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada References: <3f27bab4$1@baen1673807.greenlnk.net> <3F28F61D.4050504@noplace.com> Subject: Re: XML DOM Binding for Ada 95 - matter of style X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Thu, 31 Jul 2003 13:10:03 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1059657003 65.110.133.134 (Thu, 31 Jul 2003 06:10:03 PDT) NNTP-Posting-Date: Thu, 31 Jul 2003 06:10:03 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:41076 Date: 2003-07-31T13:10:03+00:00 List-Id: "Preben Randhol" wrote in message news:slrnbihv85.4jd.randhol+abuse@kiuk0152.chembio.ntnu.no... > Marin David Condic wrote: > > BTW: I never really liked the XMLAda approach of using discriminated > > records and thought it should have been built in a more Object Oriented > > way using tagged records. > > What is the gain? > > I thought one of the problems with Booch was that it was using tagged > types too much. Does Charles also use this approach? One problem is that you have to make two instantiations: one for the root package, in which the root type is declared, and another, for the child package in which the actual container (derived) type is declared. This is a royal pain. Charles deliberately avoided this technique, because no inheritance is necessary. Static mechanisms are used instead, which are simpler and more general. So don't use a tagged type hierarchy when there's a simpler mechanism available. I haven't seen the XMLAda approach, but I am totally sympathetic to approaches that do *not* use tagged records. I'm not against tagged type ("object-oriented") programming, it's just that many programmers seem to treat this as a hammer looking for a nail, and automatically use a tagged type to solve a problem that is better solved other ways. Look for a new release of Charles early next week. http://home.earthlink.net/~matthewjheaney/charles/