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-08-01 04:46:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: XML DOM Binding for Ada 95 - matter of style Date: Fri, 01 Aug 2003 07:46:11 -0400 Organization: MindSpring Enterprises Message-ID: <3F2A5303.6080902@noplace.com> References: <3f27bab4$1@baen1673807.greenlnk.net> <3F28F61D.4050504@noplace.com> NNTP-Posting-Host: d1.56.a0.e1 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Server-Date: 1 Aug 2003 11:46:18 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:41122 Date: 2003-08-01T11:46:18+00:00 List-Id: Well, if one believes that there is no value in the Object Oriented Design methodology, then I suppose there is no gain. :-) First, the code would reflect the design. Everything in the XML DOM description is done with an eye towards an object oriented implementation - a base level node from which all the other nodes are derived, overriding and extension of operations, etc. You don't have to implement it as object oriented code utilizing tagged records, etc. Its just the most natural expression of the design. Second, should there be extensions in the form of adding new node types or new operations to the DOM, the Object Oriented approach makes the extension less painful than it would be to modify the discriminated record implementation. Maybe it never changes, so maybe that's not a gain. Do you really think the standards committee is going to disband and declare XML & the DOM frozen for all time? Tagged record implementation would sure make it easier for someone else to build upon it if the need should arise. IMHO, something like the DOM - an OOD expression of a desired functionality - is exactly the reason Ada invented tagged records. To implement it with discriminated records (a feature I always found to have too many "gotchas!" built into it anyway) seems awkward and clumsy. If you don't think using tagged records to implement something like this design is appropriate, what are you saving them for? :-) MDC Preben Randhol wrote: > 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? > -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "In general the art of government consists in taking as much money as possible from one class of citizens to give to the other." -- Voltaire ======================================================================