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-20 10:25:32 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: Thu, 20 Dec 2001 13:48:02 -0500 NNTP-Posting-Host: 65.94.190.113 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1008872596 65.94.190.113 (Thu, 20 Dec 2001 13:23:16 EST) NNTP-Posting-Date: Thu, 20 Dec 2001 13:23:16 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:18157 Date: 2001-12-20T13:48:02-05:00 List-Id: Brian Rogoff wrote : > To which I reply "Don't do that!". > > It's quite easy to create similar contrived bug scenarios in Ada without > automatic instantiation of generics using overloading, and, in fact, many > very smart language designers believe that overloading is awful. I > disagree, and think that by applying a bit of intelligence and good taste > overloading makes programs more readable. > > To avoid this particular problem, I would avoid the automatic > instantiation by not with-ing the generic unit and instantiating the > subprograms that I want elsewhere and with-ing those. Pretty simple, huh? > But this is the C way of doing things : Let's give the programmer all the possibilities and it's up to him to use them wisely. Ada is based on the concept that the language should prevent bugs, even if this limits the programmer sometimes. I dont say that the C way is wrong, but if I want a language that gives me all the possibilities I wont use Ada, not even a modified Ada, but I'll use C. Ada should not try to become C with words instead of brackets, but it should stay with it's "fail-fast" philosophy. If Ada wants to compete it has to offer something that C hasn't, and that's the safety of catching of most bugs either at compilation or at runtime at the line they are produced. And this even if the programmer is unwise. So IMO, whatever we change in Ada0x it shouldn't reduce the ability of the compiler to catch bugs. -- Patrick Hohmeyer