Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.lang.c Subject: Re: Breaking out of several nested loops (& ANSI C) Message-ID: <882@opus.UUCP> Date: Thu, 11-Oct-84 16:10:04 EDT Article-I.D.: opus.882 Posted: Thu Oct 11 16:10:04 1984 Date-Received: Sat, 13-Oct-84 03:58:40 EDT References: <129@ssc-vax.UUCP> <1801@pegasus.UUCP> Distribution: net Organization: NBI,Inc, Boulder CO Lines: 45 Bad confusion on the multi-level break issue: > One of the proposals that was supposed to be brought up before the last > committee meeting was a way to make breaking out of deeply nested loops > structured such that the following: > [illustration of multi-level-break problem] > would become: > -- whileloop: >... > -- break whileloop; >... > The idea is to be able to label while, for and do-while loops and be able to > use those labels on break and continue statements. This provides for a very > structured and much more readable and maintainable coding style, in my > opinion, than the equivalent code using goto's or separate procedures... >... > What does everyone think? Is this a worthy attempt at making the language > more structured and orthogonal? Send in your votes! The idea for such a language construct is reasonable, but it should not be muddled into the standardization process. Standards committees working on existing languages are NOT in the role of designing, or even revamping, a language. Naturally, they will have to make some changes--but only for those situations where there is a very real problem in the existing form(s) of the language. In fact, the proposed construct does not answer any particular crying need. Multi-level breaks are comparatively uncommon. They certainly aren't so common and so much of a problem as to justify a CHANGE to the language. Finally, the proposed solution has a very interesting characteristic: Without the extension, the multi-level break has two parts--a transfer and a label. With the extension, the multi-level break has two parts--a transfer and a label. The notable difference is that with the extension, the label is at a different point (possibly by quite a distance) than the point to which control is actually transferred. I'm hard-pressed to see that as an advantage. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Relax...don't worry...have a homebrew.