Subject: Re: compiler tweak offered
To: None <tech-toolchain@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-toolchain
Date: 08/25/2002 13:40:22
[ On Sunday, August 25, 2002 at 13:19:43 (-0400), Andrew Brown wrote: ]
> Subject: Re: compiler tweak offered
>
> >> If I were designing new features for the C language, I'd probably
> >> want the loop label to be just like an ordinary label, thus:
> >>
> >> outer: for (x=list; x; x=x->link) {
> >> while (...) {
> >> ...
> >> if (...) continue outer;
> >
> >Ah, yes, that makes more sense to me too, and if I'm not mistaken
> >there's already prior art for using labels on 'continue' and 'break' (I
> >just can't remember where at the moment -- ah, yes, Java & JavaScript.)
>
> not for nothing, but perl does this also, and predates java and
> javascript.
I have a definite mine block when it comes to remembering perl features....
(though I'm sure I could find examples of them all in a pretty-printed
version of SelfGOL :-)
--
Greg A. Woods
+1 416 218-0098; <g.a.woods@ieee.org>; <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>