Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!emory!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.c Subject: Re: problems/risks due to programming language Message-ID: <8111@hubcap.clemson.edu> Date: 22 Feb 90 01:45:25 GMT References: <201@puma.ge.com> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 30 From jnixon@andrew.ATL.GE.COM (John F Nixon): >> This is not a valid analogy. In C, the case statement *requires* the >> use of a restricted GOTO in order to accomplish "normal" processing; > > But we aren't talking about using the "break" in this sense, we are talking > about using the "break" to exit an "if", something which isn't C. We are talking about using a restricted GOTO to exit a control structure in a normal situation. The fact that one type of C control structure requires use of a GOTO for normal exit and another type of C control structure does not is a source of inconsistency and potential confusion. >> In other words, C requires use [of] a dangerous construct on a routine basis. > > Just as Ada requires the use of "exit" to leave the "loop" construct; > unless you use Ada'a "goto"... Not true; the bare "loop...end loop" is used in situations in which the intention is for the loop to execute forever. This arises in embedded controllers, operating systems, and similar applications. If one is not writing such applications, then "while (Condition) loop" and "for Control_Variable in Start..Finish loop" are normally applied. By requiring the use of a GOTO during normal processing (as C does with its switch..break system), C encourages its programmers to get into the habit of using its restricted GOTO routinely. As AT&T has recently discovered, that can easily prove to be an expensive habit. Bill Wolfe, wtwolfe@hubcap.clemson.edu