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 13:23:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: XML DOM Binding for Ada 95 - matter of style Date: Thu, 31 Jul 2003 15:25:00 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3f27bab4$1@baen1673807.greenlnk.net> <3F28F61D.4050504@noplace.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:41103 Date: 2003-07-31T15:25:00-05:00 List-Id: "Matthew Heaney" wrote in message news:Ly8Wa.716$jg7.380@newsread3.news.pas.earthlink.net... > "Preben Randhol" wrote in message > news:slrnbihv85.4jd.randhol+abuse@kiuk0152.chembio.ntnu.no... > > I thought one of the problems with Booch was that it was using tagged > > types too much. Does Charles also use this approach? You can't use tagged types too much. IMHO, virtually everything should be derived from Controlled or Limited_Controlled (which by definition makes them a tagged type). But... > 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. Right. *Inheritance* is what can easily be overused. It has its place, but it can easily be overused. And users have a hard time understanding "overriding", which is usually necessary to use these sorts of types. We did Claw that way mainly because we wanted to be able to say that it was "Object-Oriented"; if I was designing it with no marketing implications, we may have chosen a different structure. (I'm not sure, because we never did any analysis on non-O-O choices.) In the specific case of container libraries, if it takes more than one instantiation to get a basic container, it is too hard to use. If it's much more complex than that, I'd rather build my own from scratch (none of them are that much work to implement, especially as you almost never need the full generality). And I don't think it is important to have a version for every need. A version that works well for most needs is enough -- if you have truly critical needs, you ought to build something custom that meets those needs exactly. But most container needs aren't that critical. It's more important to be able to use them to quickly build a solution that you can profile to find out whether it is good enough or not. Randy.