comp.lang.ada
 help / color / mirror / Atom feed
From: als@usenet.thangorodrim.de (Alexander Schreiber)
Subject: Re: Another ammunition
Date: Wed, 1 Jan 2003 17:58:21 +0100
Date: 2003-01-01T18:05:14+01:00	[thread overview]
Message-ID: <slrnb167hd.6rq.als@thangorodrim.de> (raw)
In-Reply-To: hVyQ9.4454$F63.96878@news.xtra.co.nz

AG <ang@xtra.co.nz> wrote:
>> Jean-Pierre Rosen <rosen@adalog.fr> wrote:
>
>> -ansi -Wall -pedantic -Wtraditional -Wpointer-arith -Wshadow
>> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
>> -Waggregate-return -Wmissing-declarations -Wnested-externs -Winline
>> -Werror -W
>
>> Forces you to fix the simple bugs to even get your code to compile
>> (leaving you to be more creative in creating tricky logic bugs).
>
>That's an interesting example. All those switches needed
>to force you to "fix the simple bugs"?

"simple bugs" == stuff the compiler can find, like trying to write into
constants, type mismatches (returning ints but expecting floats), tyops
(like a forgotten ";") and the like. Still leaves you free to add buffer
overruns, off-by-one errors and so on to your hearts content ;-)

>How many people
>would you think would bother with all the switches?
>And not make a mistake of omitting one?

Very few. I've seen enough projects that simply dump stdout and stderr
of the compiler into /dev/null during the compile stage - probably to
keep the user installing this software from seeing gcc complain about
the ugly C he is fed.

The long list of compiler switches above came from a programming
assignment I once did - I tried to force gcc into the most anal
retentive mode possible to avoid leaving stupid and simple coding errors
in the project. It helped.

>Even more importantly, how do you know *you* haven't
>missed one or two? Sure, there are manuals (or are there?
>or are the manuals complete and up to date? etc etc) but
>even then, setting up all those switches is surely subject
>to human error. Isn't it better to just have all of that built
>right into the language which compiler is required to enforce?

I'm not trying to argue that you should drop Ada and use C instead -
there are more than enough misguided zealots of this kind already
around. IMHO, the digital world would most likely be a slightly safer
place if more software were written in Ada instead of C (and some
obnoxious software wouldn't be written at all - good riddance).

For me, Ada is an interesting and powerful language - but I still need
to find the time to do more than write the canonical "Hello world" in
Ada.

Regards,
      Alex.
-- 
"Opportunity is missed by most people because it is dressed in overalls and
 looks like work."                                      -- Thomas A. Edison



  reply	other threads:[~2003-01-01 16:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-31 10:23 Another ammunition Jean-Pierre Rosen
2002-12-31 11:43 ` Eric G. Miller
2002-12-31 12:57   ` Jean-Pierre Rosen
2002-12-31 16:23     ` Alexander Schreiber
2003-01-02  6:55       ` AG
2003-01-01 16:58         ` Alexander Schreiber [this message]
2003-01-07 12:54           ` Peter Hermann
2003-01-07 13:21           ` Richard Riehle
2003-01-11 18:29             ` Alexander Schreiber
2003-01-13  2:11               ` u.r. faust
2003-01-12 12:44                 ` Larry Kilgallen
2003-01-14  1:24                   ` Georg Bauhaus
2003-01-03  9:50         ` Jean-Pierre Rosen
2003-01-03 15:24         ` Stephen Leake
2002-12-31 16:40     ` Warren W. Gay VE3WWG
2003-01-04 20:17       ` David Thompson
2003-01-06 17:39         ` Warren W. Gay VE3WWG
2003-01-06 20:50           ` Stephen Leake
2003-01-06 22:16             ` Warren W. Gay VE3WWG
2003-01-07 18:37               ` Stephen Leake
2003-01-07 21:55                 ` Warren W. Gay VE3WWG
2003-01-01  9:05 ` Michael Erdmann
2003-01-07 13:03   ` Peter Hermann
replies disabled

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