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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.software-eng:3191 comp.lang.ada:3455 comp.lang.c:26906 comp.lang.fortran:2986 comp.lang.lisp:2921 comp.lang.misc:4452 comp.lang.modula2:2185 comp.lang.pascal:3237 comp.lang.scheme:1172 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!kaukau.comp.vuw.ac.nz!lindsay From: lindsay@comp.vuw.ac.nz (Lindsay Groves) Newsgroups: comp.software-eng,comp.lang.ada,comp.lang.c,comp.lang.fortran,comp.lang.lisp,comp.lang.misc,comp.lang.modula2,comp.lang.pascal,comp.lang.scheme Subject: Re: problems/risks due to programming language, stories requested Message-ID: <1990Mar14.044656.28854@kaukau.comp.vuw.ac.nz> Date: 14 Mar 90 04:46:56 GMT References: <1004@micropen> <6960@internal.Apple.COM> Sender: news@kaukau.comp.vuw.ac.nz (News Admin) Reply-To: lindsay@comp.vuw.ac.nz Organization: Computer Science Dept, Victoria University, Wellington, NEW ZEALAND List-Id: In article <1004@micropen>, dave@micropen (David F. Carlson) writes: > What break does is *very* well defined and is no more prone to misinterpretation > that any other non-linear control flow statement in any other PL. A number of people in this discussion (which I haven't reached the end of yet!) have said things like this, and appear to be suggesting that because something is well defined there is no excuse for anyone misusing it. I disagree with that and also with the second part of this statement. There are languages in which any kind of exit has to explicitly name the construct to be exitted -- so there is no possiblity of consfusion about which construct the exit/break/etc. applies to. > A multi-case switch is very handy in many situations to reduce identical > treatments for similar cases. That you ask the question of the usefulness > of break-per-case/multiple-cases implies that you haven't sufficient experience > with the construct to judge its merits/weaknesses. > > Dijkstra notes that no programming language can prevent a poor programmer from > creating bad programs. So why aren't we all still using FORTRAN (or some older dialect)? Why did we all think that unlabelled CASE statements (as in Algol-W and Burroughs Algol) were a big improvement over computed GOTOs in FORTRAN (which is basically what the switch in C is), or that the labelled CASE statement (as in Pascal) was a big improvement over that? Maybe the whole of the last 30 years of work in programming language design has been a dream!!! Lindsay Groves