Article View: comp.std.c
Article #3483Re: Multi-level break and elimination of GOTO
From: Greg Comeau
Date: Fri, 10 Nov 1995 23:55
Date: Fri, 10 Nov 1995 23:55
30 lines
1893 bytes
1893 bytes
In article <DHpCK1.HyG@kroete2.freinet.de> ehcorry@inet.uni-c.dk (Erik Corry) writes:
>: Andrew Dunbar (andrewd@agnus.livewire.com.au) wrote:
>: : for outer (x = 0; x < MAXX; x++)
>: : ...
>: : break (outer);
>
>What I think is wrong with 'named loops':
>
>2) It's a completely new syntax for C. This makes parsing it difficult.
> Specifically it looks like a function call inner() yet it is actually
> a label. Major grief for the lexer/parser interface. So at a minmum
> there should be a ':' after the label to help the lexer. If you
> do that why not swap the order of the label and the for/while token
> and do it like Java!
Assuming this proposal could ever actually gain momentum, I wouldn't
be for the ()'s on the break, but would never reject it for parsing
problems. In fact, I think the parsing would be ok and not the problem
you mention.
The real problem I have with this proposal is that it only considers `for'
(and probably `while'). If to be stronger, it could be more general than
just those, plus consider appropriateness of special cases.
Even with that though, no doubt we still wouldn't see it fly...
- Greg
--
Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418-3214
Here:comeau@csanta.attmail.com / BIX:comeau or comeau@bix.com / CIS:72331,3421
Voice:718-945-0009 / Fax:718-441-2310 / Prodigy: tshp50a / WELL: comeau
Technical Details
Message-ID:
<480oqa$l1j@panix.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!panix!not-for-mailReferences:
<DF8FE3.97H@news.cern.ch> <rnbohuqj8p3.fsf@euax7i3c01.eua.ericsson.se> <DHpCK1.HyG@kroete2.freinet.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!panix!not-for-mail From: comeau@panix.com (Greg Comeau) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Multi-level break and elimination of GOTO Date: 10 Nov 1995 18:55:54 -0500 Organization: Comeau Computing Message-ID: <480oqa$l1j@panix.com> References: <DF8FE3.97H@news.cern.ch> <rnbohuqj8p3.fsf@euax7i3c01.eua.ericsson.se> <DHpCK1.HyG@kroete2.freinet.de> Reply-To: comeau@csanta.attmail.com (Greg Comeau) NNTP-Posting-Host: panix.com