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.1 required=5.0 tests=BAYES_40,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.software-eng:3009 comp.lang.ada:3366 comp.lang.c:26488 comp.lang.fortran:2946 comp.lang.lisp:2850 comp.lang.misc:4310 comp.lang.modula2:2132 comp.lang.pascal:3183 comp.lang.scheme:1126 Path: utzoo!attcan!uunet!jarthur!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!ur-valhalla!micropen!dave From: dave@micropen (David F. Carlson) 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 Summary: clearly defined Message-ID: <1004@micropen> Date: 2 Mar 90 19:19:01 GMT References: <6960@internal.Apple.COM> Organization: Micropen Direct Writing Systems, Pittsford, NY List-Id: In article <6960@internal.Apple.COM>, chewy@apple.com (Paul Snively) writes: > > > For what it's worth, my personal opinion is that C lends itself to > precisely the kinds of errors noted above--when does break work and when > doesn't it, and why in God's name do you need it in switch statements in > the first place, etc. 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. >From K&R2 p 244: A9.5: iteration statement is (for, while, do)... A break statement may appear only in an iteration statement or a switch statement; control passes to the statement following the terminated statement. 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. -- David F. Carlson, Micropen, Inc. micropen!dave@ee.rochester.edu "The faster I go, the behinder I get." --Lewis Carroll