comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <no.spam@getalife.com>
Subject: Implicit instantiation (was Re: was Re: Ada / C++ comparison paper anymore)
Date: Fri, 21 Dec 2001 03:12:24 GMT
Date: 2001-12-21T03:12:24+00:00	[thread overview]
Message-ID: <sMxU7.16469$NM4.3218042@rwcrnsc53> (raw)
In-Reply-To: o0qU7.21560$J%2.3180364@news20.bellglobal.com


"Patrick Hohmeyer" <pi3_1415926536@yahoo.ca> 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






  parent reply	other threads:[~2001-12-21  3:12 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17 10:22 Ada / C++ comparison paper Martin Dowie
2001-12-17 14:42 ` Frode Tenneboe
2001-12-17 22:07   ` Hyman Rosen
2001-12-17 22:34     ` David C. Hoos
2001-12-17 22:37     ` Marin David Condic
2001-12-18  0:54       ` Ed Falis
2001-12-18  9:30         ` martin.m.dowie
2001-12-18 14:49           ` Marin David Condic
2001-12-18 17:51           ` Hyman Rosen
2001-12-19 16:10             ` Greg C
2001-12-20 14:41               ` Hyman Rosen
2001-12-20 20:16                 ` Greg C
2001-12-19 20:44             ` Wes Groleau
2001-12-19 20:47               ` Ed Falis
2001-12-20 18:16                 ` Ted Dennison
2001-12-20 19:12                 ` Richard Riehle
2001-12-18  1:16       ` Larry Kilgallen
2001-12-17 22:52     ` Matthew Heaney
2001-12-18 15:47     ` Hyman Rosen
2001-12-18 16:20       ` Pat Rogers
2001-12-18 17:00         ` Hyman Rosen
2001-12-18 17:28           ` Larry Kilgallen
2001-12-18 19:40         ` Brian Rogoff
2001-12-18 20:25           ` Hyman Rosen
2001-12-19  0:53           ` was Re: Ada / C++ comparison paper anymore Mark Lundquist
2001-12-19  1:47             ` Brian Rogoff
2001-12-19 18:20               ` Mark Lundquist
2001-12-19 19:39                 ` Patrick Hohmeyer
2001-12-19 19:38                   ` Mark Lundquist
2001-12-19 20:51                     ` Patrick Hohmeyer
2001-12-20 17:56                       ` Brian Rogoff
2001-12-20 18:48                         ` Patrick Hohmeyer
2001-12-20 19:20                           ` Brian Rogoff
2001-12-21  3:16                             ` Implicit instantiation (was Re: Ada / C++ comparison paper anymore) Mark Lundquist
2001-12-21  3:12                           ` Mark Lundquist [this message]
2001-12-21  2:55                       ` Implicit instantiation (was Re: was " Mark Lundquist
2001-12-20 20:22             ` was Re: Ada / C++ comparison paper anymore Ted Dennison
2001-12-20 20:57               ` Marin David Condic
2001-12-21 17:44               ` Richard Riehle
2001-12-21 17:51                 ` Marin David Condic
2001-12-19 18:20       ` Ada / C++ comparison paper Mark Lundquist
2001-12-20 20:27         ` Ted Dennison
2001-12-20 20:59           ` Marin David Condic
2001-12-21 14:26             ` Ted Dennison
2001-12-21 14:32               ` Marin David Condic
2001-12-21 15:11               ` Jean-Marc Bourguet
2001-12-20 22:30           ` tmoran
2001-12-20 22:36             ` Marin David Condic
2001-12-21 14:23             ` Ted Dennison
2001-12-21 18:46               ` tmoran
2001-12-21 19:09                 ` Ted Dennison
2001-12-21  2:46           ` Mark Lundquist
2001-12-21 14:28             ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox