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,LOTS_OF_MONEY 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 19:12:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada 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> Subject: Implicit instantiation (was Re: was Re: Ada / C++ comparison paper anymore) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: NNTP-Posting-Host: fewU7-165825-NM4-3212174@rwcrnsc53 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1008904344 fewU7-165825-NM4-3212174@rwcrnsc53 (Fri, 21 Dec 2001 03:12:24 GMT) NNTP-Posting-Date: Fri, 21 Dec 2001 03:12:24 GMT Organization: AT&T Broadband Date: Fri, 21 Dec 2001 03:12:24 GMT Xref: archiver1.google.com comp.lang.ada:18187 Date: 2001-12-21T03:12:24+00:00 List-Id: "Patrick Hohmeyer" wrote in message news:o0qU7.21560$J%2.3180364@news20.bellglobal.com... > > 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. > Well, let's look at that statement: "Let's give the programmer all the possibilities, and it's up to him to use them wisely." What is wrong with that? On the face of it, that actually looks pretty good. It seems like the appropriate thing to say to grownups. So how is that "the C way of doing things"? What do you really mean? The problem with C (and C++) is that to use the language safely, you must: 1) Have command of a large knowledge base of "pitfalls" and "gotchas". For C++ this is a special trouble because so many of the pitfalls seem to involve rather advanced concepts in the language that nonetheless come into play in rather simple code. 2) Be extra-careful, and 3) Adopt various "defensive programming" practices to protect your code against others (and yourself, in case (2) fails). It's that kind of situation that Ada was engineered to avoid. Not protecting people from themselves who insist on criminally negligent programming. What you want is not "safety scissors", but a powerful tool with a sharp cutting edge, that is safe when used responsibly. My suggestion is not "the C way of doing things". Some language features cause problems in other languages, but the problems aren't due to the general concept itself (e.g. implicit instantiation), but to the form it takes in the language and especially in the context of the general foundation provided by the rest of the language. So if you start with a language that has a weak type system and a weak module system, it makes a minefield of the language and of course the specific features (e.g. genericity) are going to manifest the problems caused by the underlying weakness. Not recognizing this leads to prejudice and FUD about language features. By the way, there is no "slippery slope" here. It's not a case of "oh sure, today implicit instantiation, tomorrow who-knows-what". That would be a very bogus, straw-man argument. Implicit instantiation would not make Ada into "C without brackets". That is just plain silly. -- mark