Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site rochester.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!rochester!quiroz
From: quiroz@rochester.UUCP (Cesar Quiroz)
Newsgroups: net.lang.c
Subject: Re: Proposal for breaking out of multiple loops
Message-ID: <2321@rochester.UUCP>
Date: Wed, 17-Oct-84 21:29:04 EDT
Article-I.D.: rocheste.2321
Posted: Wed Oct 17 21:29:04 1984
Date-Received: Fri, 19-Oct-84 01:45:50 EDT
References: <13026@sri-arpa.UUCP>
Organization: U. of Rochester, CS Dept.
Lines: 34

Some more comments.

> From:            Barry Gold 
> 
> . . .
> 
> If "break label;" is to be allowed, the language definition should at least
> allow (if not require) a matching label at the end of the loop.     
> . . .

This is a sound DESIGN idea.  It not only makes the finding (while reading) of
the end of the loop easier, but provides a check the compiler can make for 
essentially every loop (namely, Is this the end of the loop the programmer was
thinking about?)

The only difficulty I can see is that the language would change too much for the
standard to be useful.  Admittedly, the original proposal is half-hearted and
the addition of the final label would improve it.  However, if the original 
proposal finds its way to the standard (fat chance! not even the originator is
defending it any further), NO working C program will be broken.  It's a matter
of compromise: the proposed additions should disturb the language as little as
possible. Some additional functionality should be gained at little cost.

For the final label to be really useful, it need be mandatory. But that seems
a bit too much: current programs will be broken mercilessly.  Maybe a little
bit of programmer's maturity will help, in the form of comments.  But that is
beyond this discussion. (Because we ALL comment at the end of a loop, don't we?)

However, if you can come with a syntax that doesn't break existing programs and
provides the needed cleanliness, be it welcome. (I have my doubts, though. I
think the best solution is terminating keywords for all compound statements
and that crashes heads on with the nice/silly braces).

Cesar