Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site uokvax.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!inuxc!pur-ee!uiucdcs!uokvax!jab From: jab@uokvax.UUCP Newsgroups: net.lang Subject: Re: Re: Teaching students with GOTO - (nf) Message-ID: <9000024@uokvax.UUCP> Date: Tue, 29-May-84 01:28:00 EDT Article-I.D.: uokvax.9000024 Posted: Tue May 29 01:28:00 1984 Date-Received: Fri, 1-Jun-84 08:30:38 EDT References: <5806@mcvax.UUCP> Lines: 26 Nf-ID: #R:mcvax:-580600:uokvax:9000024:000:1103 Nf-From: uokvax!jab May 29 00:28:00 1984 #R:mcvax:-580600:uokvax:9000024:000:1103 uokvax!jab May 29 00:28:00 1984 One person just submitted a response to an article to the effect of "goto's (he was using Algol W as the example) have a place: to exit a program on an error, and to break out of loops". You're right, I agree. Algol W isn't the best example, however: i) There is an "assert (expr)" statement that halts the program whenever "expr" is not true. ii) In Algol W, there is no loop-exiting construct, which is a real pain. Any reasonable language should provide you with one; the constructs in C are in the right direction, although I'd like to be able to specify "break out of the loop I'm in, hopping out of the scope of this loop and the next deeper one" --- operationally a "break 2;" construct. Such control structures should be provided as part of the language. Were I teaching a programming class, I would insist on justification of why people used "goto" statements; if it's not one of the above reasons, I'd view it as a bad practice and grade off. (Possibly I'd grade off anyway, if they could have recoded to get around it with little pain.) Jeff Bowles Lisle, Il