comp.lang.ada
 help / color / mirror / Atom feed
From: sommar@enea.se (Erland Sommarskog)
Subject: Re: problems/risks due to programming language
Date: 24 Feb 90 19:39:27 GMT	[thread overview]
Message-ID: <806@enea.se> (raw)

Scott MacHaffie (machaffi@fred.cs.washington.edu.cs.washington.edu) writes:
)Bill Wolfe (billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu) writes:
))   the NEXT case.  In other words, C requires the programmer to use a
))   dangerous construct on a routine basis.
)
)(the dangerous construct is the "break" statement)
)But if "break" were renamed "end case" then there wouldn't be any problem?
)
))   code associated with the else part.  Thus, we have an inconsistency
))   in C's design: with one flow-of-control construct (the switch), it is
))   necessary to use a dangerous GOTO to achieve normal processing, whereas
)
)No, it is necessary to use a statement to indicate that the current case
)statement is finished...like an "end case" or the next "when =) " in ADA.

I don't speak C, so I might have missunderstood something, but I'm
under the impression that you may exclude the "break" statement
achieving the effect that you execute the code for the next case too.
Sometimes possibly a nifty feature, but it seems to me that is a good
source of errors. Whether it's called "break" or "end case" has no
importance. You may inadvertantly forget it in both cases.

)I don't use LINT. I use compilers that check certain things I want checked,
)like "no prototypes in scope".  LINT does not catch the kinds of mistakes
)that I make.  How many ADA programmers do you know of use LINT?

Ada programmers don't use lint, they don't have to.

From another article by Scott MacHaffie:
)Good programmers understand the language they are using -- good programmers
)are literate. No language can eliminate errors. Good software engineering
)practices should be used to (try to) catch language-specific errors.

And good languages should have as few unnecessary traps as possible
to help the software engineer spend his efforts on essentials.
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se

             reply	other threads:[~1990-02-24 19:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-02-24 19:39 Erland Sommarskog [this message]
  -- strict thread matches above, loose matches on Subject: below --
1990-02-28 18:57 problems/risks due to programming language, stories requested Paul Snively
1990-03-02 19:19 ` David F. Carlson
1990-03-03  2:10   ` problems/risks due to programming language Karl Heuer
     [not found] <5432@crdgw1.crd.ge.com) <8103@hubcap.clemson.edu) <10811@june.cs.washington.edu) <806@enea.se>
1990-02-26 18:48 ` What`s in a name?
1990-02-26 22:02   ` Karl Heuer
1990-03-02 10:57   ` Erland Sommarskog
     [not found] <10811@june.cs.washington.edu% <8126@hubcap.clemson.edu% <10838@june.cs.washington.edu>
1990-02-23 18:55 ` B. S. Oplinger
1990-02-23  6:46 Scott MacHaffie
1990-02-21 16:49 problems/risks due to programming language, stories requested Richard A Hammond
1990-02-21 20:15 ` problems/risks due to programming language William Thomas Wolfe, 2847 
1990-02-21 22:49   ` Richard A Hammond
1990-02-21 23:14   ` John F Nixon
1990-02-22  5:39   ` Scott MacHaffie
1990-02-22 20:13     ` William Thomas Wolfe, 2847 
1990-02-23 17:32       ` Richard A Hammond
1990-02-25 20:23         ` David Kassover
1990-02-22 20:48     ` Jeff Lawhorn
1990-02-23  2:00     ` Douglas Miller
1990-02-22 16:05       ` Dan L. Pierson
1990-02-22 20:28         ` David Kassover
1990-02-24 19:52         ` Erland Sommarskog
1990-02-23 17:45       ` Mike Harrison
1990-02-27  2:02         ` Douglas Miller
1990-02-22 18:28   ` Mike Percy
1990-02-23  2:09   ` Douglas Miller
replies disabled

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