220 3585 <CAFk2RUZjpkHZL-DtdyuCabBYRpi+65bYmTrDaQ4gPnw++F-iWg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "break break ;" etc. to break out of nested loops
Date: Sat, 6 Apr 2013 14:39:42 +0300
Lines: 105
Approved: news@gmane.org
Message-ID: <CAFk2RUZjpkHZL-DtdyuCabBYRpi+65bYmTrDaQ4gPnw++F-iWg@mail.gmail.com>
References: <1f964e4b-2762-43b8-85e5-41392926b07a@isocpp.org>
	<CAOHCbiuv0zLyEu-7RJR9rLzs-zwQRrxbkYjfO3jHTJj2GrGgYQ@mail.gmail.com>
	<515FC3B0.2090803@gmail.com>
	<b1210fad-f90d-4964-aec2-102fb814c44c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b2e0887dba6eb04d9afa839
X-Trace: ger.gmane.org 1365268744 17367 80.91.229.3 (6 Apr 2013 17:19:04 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 6 Apr 2013 17:19:04 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRB74SQCFQKGQE4F6NVCA@isocpp.org Sat Apr 06 19:19:06 2013
Return-path: <std-proposals+bncBC5JHI7A7ALRB74SQCFQKGQE4F6NVCA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRB74SQCFQKGQE4F6NVCA@isocpp.org>)
	id 1UOWI5-0006My-HR
	for gclcip-std-proposals@m.gmane.org; Sat, 06 Apr 2013 18:48:33 +0200
Original-Received: by mail-ie0-f198.google.com with SMTP id 17sf26114096iea.9
        for <gclcip-std-proposals@m.gmane.org>; Sat, 06 Apr 2013 09:48:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:mime-version
         :x-received:in-reply-to:references:date:message-id:subject:from:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=fyI2MqRDHr2T2V95rBydzieLhNup0ovTsX9hZXq2qew=;
        b=RJ9BfRZv1JUBE6j71fIOIxNga0hXkn2uVVZJ/gPwbo0bVZ2nCX8cJGPW/VCngaP6Pw
         JlR7g1AilVGWlPIBkPChwN1iKeERENMGbwYa1lzj3vap0KcspNvc1jqcj//cDWRm9w1q
         6/iyaDh5QHg55po/MSxtCuNK6y+WFkir+AHjwYDyZsB+lzhUcHExNlbslqfCQTjpM3nc
         SBV5k3igDNAeRrU5nS7R78dLLizv0AAaC60rlR7tpdb7cXTq3D9jIb7SOQi/Erj67Gzh
         QYszqnezXwqwBRgTLjLrsi8qf02pzWQawvR0STyLmfQId3b6V6OW/zqFsMpM8ty0+JY3
  
X-Received: by 10.182.85.227 with SMTP id k3mr1792051obz.11.1365248383522;
        Sat, 06 Apr 2013 04:39:43 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.160.9 with SMTP id xg9ls527231obb.62.gmail; Sat, 06 Apr
 2013 04:39:42 -0700 (PDT)
X-Received: by 10.182.127.7 with SMTP id nc7mr10748614obb.94.1365248382422;
        Sat, 06 Apr 2013 04:39:42 -0700 (PDT)
Original-Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [2607:f8b0:4003:c01::22f])
        by mx.google.com with ESMTPS id s6si14103594obi.170.2013.04.06.04.39.42
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 06 Apr 2013 04:39:42 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4003:c01::22f as permitted sender) client-ip=2607:f8b0:4003:c01::22f;
Original-Received: by mail-ob0-f175.google.com with SMTP id va7so4396824obc.6
        for <std-proposals@isocpp.org>; Sat, 06 Apr 2013 04:39:42 -0700 (PDT)
X-Received: by 10.60.142.103 with SMTP id rv7mr10368808oeb.34.1365248382292;
 Sat, 06 Apr 2013 04:39:42 -0700 (PDT)
Original-Received: by 10.76.10.130 with HTTP; Sat, 6 Apr 2013 04:39:42 -0700 (PDT)
In-Reply-To: <b1210fad-f90d-4964-aec2-102fb814c44c@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:4003:c01::22f as
 permitted sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3585
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3585>

--047d7b2e0887dba6eb04d9afa839
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 6 April 2013 12:23, <morwenn29@gmail.com> wrote:

> Le samedi 6 avril 2013 08:41:52 UTC+2, Chip Salzenberg a =E9crit :
>
>> On 4/5/2013 3:23 PM, Tony V E wrote:
>> > label: for (;;)
>> > {
>> >    break label;
>> > }
>>
>> Yes, please; if this must be done, this is the way.  It's one of the
>> things that's actually worth borrowing from Perl.  The label is
>> semantically useful, and not brittle if another level is added.  Thus:
>>
>>     line:
>>       while (cin >> s) {
>>           ...
>>           if (COND) continue line;
>>           ...
>>       }
>>
>
>  That seems to be the only viable way to go for this kind of problem. The
> break 1, break 2, break 3, etc... is easy to understand but, even as a
> compile-time constant, I dont want to imagine what could be done with suc=
h
> a construct (well, I don't want to know, but never see it in real code):
>
>
Sure, java has a similar labeled-break. I just don't see much reason to
have such a labeled-break instead of goto.

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.



--047d7b2e0887dba6eb04d9afa839
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 6=
 April 2013 12:23,  <span dir=3D"ltr">&lt;<a href=3D"mailto:morwenn29@gmail=
..com" target=3D"_blank">morwenn29@gmail.com</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
Le samedi 6 avril 2013 08:41:52 UTC+2, Chip Salzenberg a =E9crit=A0:<div cl=
ass=3D"im"><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:=
0.8ex;border-left:1px #ccc solid;padding-left:1ex">On 4/5/2013 3:23 PM, Ton=
y V E wrote:
<br>&gt; label: for (;;)
<br>&gt; {
<br>&gt; =A0 =A0break label;
<br>&gt; }
<br>
<br>Yes, please; if this must be done, this is the way. =A0It&#39;s one of =
the
<br>things that&#39;s actually worth borrowing from Perl. =A0The label is
<br>semantically useful, and not brittle if another level is added. =A0Thus=
:
<br>
<br>=A0 =A0 line:
<br>=A0 =A0 =A0 while (cin &gt;&gt; s) {
<br>=A0 =A0 =A0 =A0 =A0 ...
<br>=A0 =A0 =A0 =A0 =A0 if (COND) continue line;
<br>=A0 =A0 =A0 =A0 =A0 ...
<br>=A0 =A0 =A0 }<br></blockquote><div>=A0</div></div><div>=A0That seems to=
 be the only viable way to go for this kind of problem. The break 1, break =
2, break 3, etc... is easy to understand but, even as a compile-time consta=
nt, I dont want to imagine what could be done with such a construct (well, =
I don&#39;t want to know, but never see it in real code):<br>
<br></div></blockquote><div><br></div><div>Sure, java has a similar labeled=
-break. I just don&#39;t see much reason to have such a labeled-break inste=
ad of goto. <br></div></div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--047d7b2e0887dba6eb04d9afa839--

.
