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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLYTO_END_DIGIT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,198c6302c4a0b0d7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-19 11:15:42 PST From: Patrick Hohmeyer Subject: Re: was Re: Ada / C++ comparison paper anymore Newsgroups: comp.lang.ada Reply-To: pi3_1415926536@yahoo.ca References: <3c1dc786@pull.gecm.com> <1008601517.470745@edh3> <1008626816.690418@master.nyc.kbcfp.com> <1008690461.380980@master.nyc.kbcfp.com> <_xRT7.4398$xl6.682759@rwcrnsc54> <_T4U7.8960$xl6.990924@rwcrnsc54> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8Bit User-Agent: KNode/0.3.2 Message-ID: Date: Wed, 19 Dec 2001 14:39:05 -0500 NNTP-Posting-Host: 65.94.190.113 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1008789263 65.94.190.113 (Wed, 19 Dec 2001 14:14:23 EST) NNTP-Posting-Date: Wed, 19 Dec 2001 14:14:23 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news1.tor.metronet.ca!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:18111 Date: 2001-12-19T14:39:05-05:00 List-Id: Mark Lundquist wrote : > > For generic subprograms, it would be _really_ nice. I'd like to be able > to write this: > [snip code] > > Note: > (a) the instantiations are implicit (no "new" required); NOOOOOOOOOOOOOO Everything automatic (auto-cast, auto-instantiations, etc) is the root of all bugs. I consider it one of Ada's greatest *strength* that there is no auto-instantiation. Because you can write : type T1 is //whatever type T2 is new T1; procedure P1 is new P_Base(T1); //P_Base is generic now T1 and T2 have the same content, but different behavior. And you can be sure that the P1 procedure cant be called with a T2 variable as parameter. (Except explicit casting : P1(T1(Variable_Of_T2)); ) If you allow auto-instantiation, this strength of Ada vanishs. BTW : I would vote for an increment operator too. I love shortcuts, as long as they dont do things automatic. -- Patrick Hohmeyer