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-02 07:40:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread4.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: Sat, 02 Aug 2003 14:40:36 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread4.news.pas.earthlink.net 1059835236 65.110.133.134 (Sat, 02 Aug 2003 07:40:36 PDT) NNTP-Posting-Date: Sat, 02 Aug 2003 07:40:36 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:41142 Date: 2003-08-02T14:40:36+00:00 List-Id: "Simon Wright" wrote in message news:x7vn0eu4iwc.fsf@smaug.pushface.org... > > It's not clear to me that this is a consequence of using tagged > types?? perhaps .. anyway, what people complain about, until they've > got used to it or developed a tool to generate the code for them, is > the instantiating, not the taggedness. But you have to perform the instantiation because the type you really need is a derivation. If there were no derivation (no inheritance), then there would be no need for the second instantiation and the problem would disappear. The other issue is that iteration can only be done using a class-wide type, which means all operations are dynamically bound. Not only is this less efficient, it is unnecessary, because all the types are known statically. The only time it would make sense to use dynamic binding is if the type of the container object weren't known until run-time. But this is very atypical. There is also a space penalty, because each iterator object must also carry a tag, in addition to the internal pointer.