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,198c6302c4a0b0d7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-20 11:20:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!sjc-peer.news.verio.net!news.verio.net!sjc-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: was Re: Ada / C++ comparison paper anymore In-Reply-To: Message-ID: 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=US-ASCII Date: Thu, 20 Dec 2001 19:20:32 GMT NNTP-Posting-Host: 192.220.65.223 X-Complaints-To: abuse@verio.net X-Trace: sjc-read.news.verio.net 1008876032 192.220.65.223 (Thu, 20 Dec 2001 19:20:32 GMT) NNTP-Posting-Date: Thu, 20 Dec 2001 19:20:32 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:18160 Date: 2001-12-20T19:20:32+00:00 List-Id: Well, I hope you don't use (1) use clauses (2) overloading (didn't reply to that point, eh?) (3) tagged types at all in your Ada programming, since these features are all prone to misuse, and reduce the ability of the compiler and reader to catch bugs. Saying something is "the C way" is just a silly form of argumentation. Ada now allows aliased local variables too, even though Ada 83 didn't have this feature. Ada also has access parameters, and even access to subprogram. Lots of Ada features can be abused. Your example is a bit contrived, and its clear to me (maybe to Mark too) that some amount of automatic instantiation leads to more readable code. Ada is just another programming language to me, better than its competitors as a systems programming language IMO, but far from ideal. -- Brian On Thu, 20 Dec 2001, Patrick Hohmeyer wrote: > 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 >