Topic: Multiple break for two or more level of inner loops


Author: Rupesh Yadav <7yadavrupesh@gmail.com>
Date: Sun, 4 Jan 2015 08:46:50 -0800 (PST)
Raw View
------=_Part_2544_375202313.1420390010501
Content-Type: multipart/alternative;
 boundary="----=_Part_2545_1013286999.1420390010501"

------=_Part_2545_1013286999.1420390010501
Content-Type: text/plain; charset=UTF-8

Simple case: if *condition* is satisfied i want to break from all loops.

Example :

for(M){
    for(N){
        for(K){
            if(condition is true){
                flag = 1;
                break;
            }
        }
        if(flag==1) //  worst case checking MxN times
        break;
    }
    if(flag==1) // checking M times
        break;
}

We can simply do like this:

for(M){
    for(N){
        for(K){
            if(condition is true){
                break break break;  // exit from three loops
            }
        }
    }
}

We can eliminate :
1. No extra *flag* variables ( less memory )
2. No need to put unnecessary *if(condition)* ( speed up )

Correct me if there is something wrong or there is already an option to
optimize it.

--

---
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 email 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-proposals/.

------=_Part_2545_1013286999.1420390010501
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Simple case: if <b>condition</b> is satisfied i want to br=
eak from all loops.<br><br>Example : <br><br>for(M){<br>&nbsp;&nbsp; &nbsp;=
for(N){&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(K){=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(condition is true){<br>&nbsp;=
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;flag =
=3D 1;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&n=
bsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nb=
sp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp=
;&nbsp; &nbsp;if(flag=3D=3D1) //&nbsp;  worst case checking MxN times<br>&n=
bsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp=
;&nbsp; &nbsp;if(flag=3D=3D1) // checking M times<br>&nbsp;&nbsp; &nbsp;&nb=
sp;&nbsp; &nbsp;break;<br>}<br><br>We can simply do like this:<br><br>for(M=
){<br>&nbsp;&nbsp; &nbsp;for(N){&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&=
nbsp;&nbsp; &nbsp;for(K){&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
 &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(cond=
ition is true){<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; &nbsp;break break break;&nbsp; // exit from three loops<br>&n=
bsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;}<br>}<br><br>We can elimina=
te :<br>1. No extra <b>flag</b> variables ( less memory )<br>2. No need to =
put unnecessary <b>if(condition)</b> ( speed up )<br><br>Correct me if ther=
e is something wrong or there is already an option to optimize it.</div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_2545_1013286999.1420390010501--
------=_Part_2544_375202313.1420390010501--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sun, 4 Jan 2015 18:51:22 +0200
Raw View
On 4 January 2015 at 18:46, Rupesh Yadav <7yadavrupesh@gmail.com> wrote:
> Simple case: if condition is satisfied i want to break from all loops.

This has been discussed before:
https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J

A similar facility has been proposed:
http://cplusplus.github.io/EWG/ewg-closed.html#85

It was rejected.

Use goto.

--

---
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 email 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-proposals/.

.


Author: Rupesh Yadav <7yadavrupesh@gmail.com>
Date: Mon, 5 Jan 2015 00:09:04 +0530
Raw View
--001a11c1195660fc48050bd7e36d
Content-Type: text/plain; charset=UTF-8

okay
how to search what is already proposed.

On Sun, Jan 4, 2015 at 10:21 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 4 January 2015 at 18:46, Rupesh Yadav <7yadavrupesh@gmail.com> wrote:
> > Simple case: if condition is satisfied i want to break from all loops.
>
> This has been discussed before:
>
> https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J
>
> A similar facility has been proposed:
> http://cplusplus.github.io/EWG/ewg-closed.html#85
>
> It was rejected.
>
> Use goto.
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/OvsLNAYo5n4/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email 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-proposals/.
>

--

---
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 email 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-proposals/.

--001a11c1195660fc48050bd7e36d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">okay<br>how to search what is already proposed.<br></div><=
div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sun, Jan 4, 201=
5 at 10:21 PM, Ville Voutilainen <span dir=3D"ltr">&lt;<a href=3D"mailto:vi=
lle.voutilainen@gmail.com" target=3D"_blank">ville.voutilainen@gmail.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On 4=
 January 2015 at 18:46, Rupesh Yadav &lt;<a href=3D"mailto:7yadavrupesh@gma=
il.com">7yadavrupesh@gmail.com</a>&gt; wrote:<br>
&gt; Simple case: if condition is satisfied i want to break from all loops.=
<br>
<br>
</span>This has been discussed before:<br>
<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20=
break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J" target=3D"_blank">https://gro=
ups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz=
0TEa25Mzg/LkE0vXW4mE0J</a><br>
<br>
A similar facility has been proposed:<br>
<a href=3D"http://cplusplus.github.io/EWG/ewg-closed.html#85" target=3D"_bl=
ank">http://cplusplus.github.io/EWG/ewg-closed.html#85</a><br>
<br>
It was rejected.<br>
<br>
Use goto.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/OvsLNAYo5n4/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/OvsLNAYo5n4=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c1195660fc48050bd7e36d--

.


Author: ibaxter@gmail.com
Date: Sun, 4 Jan 2015 19:12:36 -0800 (PST)
Raw View
------=_Part_6463_1075542533.1420427556332
Content-Type: multipart/alternative;
 boundary="----=_Part_6464_1273495332.1420427556332"

------=_Part_6464_1273495332.1420427556332
Content-Type: text/plain; charset=UTF-8



> This has been discussed before:
>
> https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J
>
> A similar facility has been proposed:
> http://cplusplus.github.io/EWG/ewg-closed.html#85
> <http://www.google.com/url?q=http%3A%2F%2Fcplusplus.github.io%2FEWG%2Fewg-closed.html%2385&sa=D&sntz=1&usg=AFQjCNHvAfk8H730nWkKXU3BjWDvo_vhdA>
>

Both of the above links are discussing jumping to label constructs which
*are* essentially goto's.
The submitter is asking for a break  'n' style construct - this is a very
different beast. It addresses the very common problem of dropping out of
nested loops and is simpler and easier to understand than the alternative -
messing with flags for the sole purpose of flow control.

Has a break 'n' construct ever been presented to the standard committee,
and if so what was the reaction to it?



--

---
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 email 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-proposals/.

------=_Part_6464_1273495332.1420427556332
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div><blockquote class=3D"gmail_quote" style=3D"=
margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;=
">This has been discussed before:
<br><a href=3D"https://groups.google.com/a/isocpp.org/forum/#!search/labele=
d$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J" target=3D"_blank" onmouse=
down=3D"this.href=3D'https://groups.google.com/a/isocpp.org/forum/#!search/=
labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J';return true;" oncli=
ck=3D"this.href=3D'https://groups.google.com/a/isocpp.org/forum/#!search/la=
beled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J';return true;">https:/=
/groups.google.com/a/<wbr>isocpp.org/forum/#!search/<wbr>labeled$20break/st=
d-proposals/<wbr>Iz0TEa25Mzg/LkE0vXW4mE0J</a>
<br>
<br>A similar facility has been proposed:
<br><a href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fcplusplus.github.=
io%2FEWG%2Fewg-closed.html%2385&amp;sa=3DD&amp;sntz=3D1&amp;usg=3DAFQjCNHvA=
fk8H730nWkKXU3BjWDvo_vhdA" target=3D"_blank" onmousedown=3D"this.href=3D'ht=
tp://www.google.com/url?q\75http%3A%2F%2Fcplusplus.github.io%2FEWG%2Fewg-cl=
osed.html%2385\46sa\75D\46sntz\0751\46usg\75AFQjCNHvAfk8H730nWkKXU3BjWDvo_v=
hdA';return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\75ht=
tp%3A%2F%2Fcplusplus.github.io%2FEWG%2Fewg-closed.html%2385\46sa\75D\46sntz=
\0751\46usg\75AFQjCNHvAfk8H730nWkKXU3BjWDvo_vhdA';return true;">http://cplu=
splus.github.io/<wbr>EWG/ewg-closed.html#85</a><br></blockquote><div>&nbsp;=
</div><div>Both of the above links are discussing jumping to label construc=
ts which *are* essentially goto's.</div><div>The submitter is asking for a =
break &nbsp;'n' style construct - this is a very different beast. It addres=
ses the very common problem of dropping out of nested loops and is simpler =
and easier to understand than the alternative - messing with flags for the =
sole purpose of flow control.</div><div><br></div><div>Has a break 'n' cons=
truct ever been presented to the standard committee, and if so what was the=
 reaction to it?</div><div><br></div><div><br></div><div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_6464_1273495332.1420427556332--
------=_Part_6463_1075542533.1420427556332--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 5 Jan 2015 06:09:24 +0200
Raw View
On 5 January 2015 at 05:12,  <ibaxter@gmail.com> wrote:
>
>> This has been discussed before:
>>
>> https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J
>>
>> A similar facility has been proposed:
>> http://cplusplus.github.io/EWG/ewg-closed.html#85
>
>
> Both of the above links are discussing jumping to label constructs which
> *are* essentially goto's.

The discussion in the first link contains mentions to 'break break' and such.

> The submitter is asking for a break  'n' style construct - this is a very
> different beast. It addresses the very common problem of dropping out of
> nested loops and is simpler and easier to understand than the alternative -
> messing with flags for the sole purpose of flow control.

That's not the only alternative. The other alternative, as I mentioned, is to
use goto.

> Has a break 'n' construct ever been presented to the standard committee, and
> if so what was the reaction to it?

I don't recall seeing such a proposal. I doubt it would fare better than the
labeled-break proposal, it's likely that it will meet the same arguments against
it.

--

---
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 email 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-proposals/.

.


Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Tue, 6 Jan 2015 19:32:04 -0500
Raw View
--001a11c2c72cb37ee5050c050e4c
Content-Type: text/plain; charset=UTF-8

The arguments against the constructs are wrong, because Ada has them.

Main_Cycle:
   *loop*
      --*  initial statements*
      *exit* Main_Cycle *when* Found;
      --*  final statements*
   *end* *loop* Main_Cycle;


On Sun, Jan 4, 2015 at 11:09 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 5 January 2015 at 05:12,  <ibaxter@gmail.com> wrote:
> >
> >> This has been discussed before:
> >>
> >>
> https://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J
> >>
> >> A similar facility has been proposed:
> >> http://cplusplus.github.io/EWG/ewg-closed.html#85
> >
> >
> > Both of the above links are discussing jumping to label constructs which
> > *are* essentially goto's.
>
> The discussion in the first link contains mentions to 'break break' and
> such.
>
> > The submitter is asking for a break  'n' style construct - this is a very
> > different beast. It addresses the very common problem of dropping out of
> > nested loops and is simpler and easier to understand than the
> alternative -
> > messing with flags for the sole purpose of flow control.
>
> That's not the only alternative. The other alternative, as I mentioned, is
> to
> use goto.
>
> > Has a break 'n' construct ever been presented to the standard committee,
> and
> > if so what was the reaction to it?
>
> I don't recall seeing such a proposal. I doubt it would fare better than
> the
> labeled-break proposal, it's likely that it will meet the same arguments
> against
> it.
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

--001a11c2c72cb37ee5050c050e4c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The arguments against the constructs are wrong, because Ad=
a has them.<br><br><div><span style=3D"color:rgb(0,0,0);font-family:&#39;Co=
urier New&#39;,monospace;font-size:14px;line-height:17.5679988861084px;back=
ground-color:rgb(255,255,240)">Main_Cycle:</span><br style=3D"color:rgb(0,0=
,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;line-height:=
17.5679988861084px;background-color:rgb(255,255,240)"><span style=3D"color:=
rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;line-=
height:17.5679988861084px;background-color:rgb(255,255,240)">=C2=A0=C2=A0=
=C2=A0</span><b style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;=
,monospace;font-size:14px;line-height:17.5679988861084px;background-color:r=
gb(255,255,240)">loop</b><br style=3D"color:rgb(0,0,0);font-family:&#39;Cou=
rier New&#39;,monospace;font-size:14px;line-height:17.5679988861084px;backg=
round-color:rgb(255,255,240)"><span style=3D"color:rgb(0,0,0);font-family:&=
#39;Courier New&#39;,monospace;font-size:14px;line-height:17.5679988861084p=
x;background-color:rgb(255,255,240)">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0--=
</span><span class=3D"" style=3D"font-family:&#39;Times New Roman&#39;,Time=
s,serif;color:rgb(0,0,0);font-size:14px;line-height:17.5679988861084px;back=
ground-color:rgb(255,255,240)"><i>=C2=A0=C2=A0initial=C2=A0statements</i></=
span><br style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;,monosp=
ace;font-size:14px;line-height:17.5679988861084px;background-color:rgb(255,=
255,240)"><span style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;=
,monospace;font-size:14px;line-height:17.5679988861084px;background-color:r=
gb(255,255,240)">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><b style=3D"col=
or:rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;li=
ne-height:17.5679988861084px;background-color:rgb(255,255,240)">exit</b><sp=
an style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;fo=
nt-size:14px;line-height:17.5679988861084px;background-color:rgb(255,255,24=
0)">=C2=A0Main_Cycle=C2=A0</span><b style=3D"color:rgb(0,0,0);font-family:&=
#39;Courier New&#39;,monospace;font-size:14px;line-height:17.5679988861084p=
x;background-color:rgb(255,255,240)">when</b><span style=3D"color:rgb(0,0,0=
);font-family:&#39;Courier New&#39;,monospace;font-size:14px;line-height:17=
..5679988861084px;background-color:rgb(255,255,240)">=C2=A0Found;</span><br =
style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;font-=
size:14px;line-height:17.5679988861084px;background-color:rgb(255,255,240)"=
><span style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;,monospac=
e;font-size:14px;line-height:17.5679988861084px;background-color:rgb(255,25=
5,240)">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0--</span><span class=3D"" style=
=3D"font-family:&#39;Times New Roman&#39;,Times,serif;color:rgb(0,0,0);font=
-size:14px;line-height:17.5679988861084px;background-color:rgb(255,255,240)=
"><i>=C2=A0=C2=A0final=C2=A0statements</i></span><br style=3D"color:rgb(0,0=
,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;line-height:=
17.5679988861084px;background-color:rgb(255,255,240)"><span style=3D"color:=
rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;line-=
height:17.5679988861084px;background-color:rgb(255,255,240)">=C2=A0=C2=A0=
=C2=A0</span><b style=3D"color:rgb(0,0,0);font-family:&#39;Courier New&#39;=
,monospace;font-size:14px;line-height:17.5679988861084px;background-color:r=
gb(255,255,240)">end</b><span style=3D"color:rgb(0,0,0);font-family:&#39;Co=
urier New&#39;,monospace;font-size:14px;line-height:17.5679988861084px;back=
ground-color:rgb(255,255,240)">=C2=A0</span><b style=3D"color:rgb(0,0,0);fo=
nt-family:&#39;Courier New&#39;,monospace;font-size:14px;line-height:17.567=
9988861084px;background-color:rgb(255,255,240)">loop</b><span style=3D"colo=
r:rgb(0,0,0);font-family:&#39;Courier New&#39;,monospace;font-size:14px;lin=
e-height:17.5679988861084px;background-color:rgb(255,255,240)">=C2=A0Main_C=
ycle;</span><br><br></div></div><div class=3D"gmail_extra"><br><div class=
=3D"gmail_quote">On Sun, Jan 4, 2015 at 11:09 PM, Ville Voutilainen <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com" target=3D"_bl=
ank">ville.voutilainen@gmail.com</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><span class=3D"">On 5 January 2015 at 05:12,=C2=A0 &lt;<a hre=
f=3D"mailto:ibaxter@gmail.com">ibaxter@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; This has been discussed before:<br>
&gt;&gt;<br>
&gt;&gt; <a href=3D"https://groups.google.com/a/isocpp.org/forum/#!search/l=
abeled$20break/std-proposals/Iz0TEa25Mzg/LkE0vXW4mE0J" target=3D"_blank">ht=
tps://groups.google.com/a/isocpp.org/forum/#!search/labeled$20break/std-pro=
posals/Iz0TEa25Mzg/LkE0vXW4mE0J</a><br>
&gt;&gt;<br>
&gt;&gt; A similar facility has been proposed:<br>
&gt;&gt; <a href=3D"http://cplusplus.github.io/EWG/ewg-closed.html#85" targ=
et=3D"_blank">http://cplusplus.github.io/EWG/ewg-closed.html#85</a><br>
&gt;<br>
&gt;<br>
&gt; Both of the above links are discussing jumping to label constructs whi=
ch<br>
&gt; *are* essentially goto&#39;s.<br>
<br>
</span>The discussion in the first link contains mentions to &#39;break bre=
ak&#39; and such.<br>
<span class=3D""><br>
&gt; The submitter is asking for a break=C2=A0 &#39;n&#39; style construct =
- this is a very<br>
&gt; different beast. It addresses the very common problem of dropping out =
of<br>
&gt; nested loops and is simpler and easier to understand than the alternat=
ive -<br>
&gt; messing with flags for the sole purpose of flow control.<br>
<br>
</span>That&#39;s not the only alternative. The other alternative, as I men=
tioned, is to<br>
use goto.<br>
<span class=3D""><br>
&gt; Has a break &#39;n&#39; construct ever been presented to the standard =
committee, and<br>
&gt; if so what was the reaction to it?<br>
<br>
</span>I don&#39;t recall seeing such a proposal. I doubt it would fare bet=
ter than the<br>
labeled-break proposal, it&#39;s likely that it will meet the same argument=
s against<br>
it.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c2c72cb37ee5050c050e4c--

.


Author: David Krauss <potswa@gmail.com>
Date: Wed, 7 Jan 2015 08:51:57 +0800
Raw View
--Apple-Mail=_4C7310C4-2258-4804-B346-0AF9B48689FE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9301=E2=80=9307, at 8:32 AM, Hyman Rosen <hyman.rosen@gmail=
..com> wrote:
>=20
> The arguments against the constructs are wrong, because Ada has them.

The arguments seem to be as much cultural as logical. Perhaps attitudes wil=
l shift in a couple decades.

In the meantime, maybe someone can step up and prototype it as a -std=3Dgnu=
++ extension?

--=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/.

--Apple-Mail=_4C7310C4-2258-4804-B346-0AF9B48689FE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9307, at 8:32 AM, Hyman Rosen &lt;<a href=3D"mailto:hyman.rosen@gmai=
l.com" class=3D"">hyman.rosen@gmail.com</a>&gt; wrote:</div><br class=3D"Ap=
ple-interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D"">The ar=
guments against the constructs are wrong, because Ada has them.<br class=3D=
""></div></div></blockquote></div><br class=3D""><div class=3D"">The argume=
nts seem to be as much cultural as logical. Perhaps attitudes will shift in=
 a couple decades.</div><div class=3D""><br class=3D""></div><div class=3D"=
">In the meantime, maybe someone can step up and prototype it as a <font fa=
ce=3D"Courier" class=3D"">-std=3Dgnu++</font> extension?</div></body></html=
>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_4C7310C4-2258-4804-B346-0AF9B48689FE--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 7 Jan 2015 03:07:24 +0200
Raw View
On 7 January 2015 at 02:51, David Krauss <potswa@gmail.com> wrote:
> The arguments seem to be as much cultural as logical. Perhaps attitudes will
> shift in a couple decades.
> In the meantime, maybe someone can step up and prototype it as a -std=gnu++
> extension?

That seems like a rather pointless exercise, since implementability
was not a concern
when the proposal was rejected.

--

---
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 email 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-proposals/.

.


Author: David Krauss <potswa@gmail.com>
Date: Wed, 7 Jan 2015 09:28:00 +0800
Raw View
> On 2015=E2=80=9301=E2=80=9307, at 9:07 AM, Ville Voutilainen <ville.vouti=
lainen@gmail.com> wrote:
>=20
> On 7 January 2015 at 02:51, David Krauss <potswa@gmail.com> wrote:
>> The arguments seem to be as much cultural as logical. Perhaps attitudes =
will
>> shift in a couple decades.
>> In the meantime, maybe someone can step up and prototype it as a -std=3D=
gnu++
>> extension?
>=20
> That seems like a rather pointless exercise, since implementability
> was not a concern
> when the proposal was rejected.

As for standardization, my suggestion was to wait a couple decades :)

Having an implementation would allow it to be used.

--=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/.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 7 Jan 2015 03:34:36 +0200
Raw View
On 7 January 2015 at 03:28, David Krauss <potswa@gmail.com> wrote:
>> That seems like a rather pointless exercise, since implementability
>> was not a concern
>> when the proposal was rejected.
> As for standardization, my suggestion was to wait a couple decades :)
> Having an implementation would allow it to be used.


The last thing we need is more rejected extensions being shipped by
implementations.

--

---
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 email 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-proposals/.

.


Author: Myriachan <myriachan@gmail.com>
Date: Tue, 6 Jan 2015 18:10:13 -0800 (PST)
Raw View
------=_Part_187_888974457.1420596613278
Content-Type: multipart/alternative;
 boundary="----=_Part_188_949966620.1420596613278"

------=_Part_188_949966620.1420596613278
Content-Type: text/plain; charset=UTF-8

On Sunday, January 4, 2015 8:09:25 PM UTC-8, Ville Voutilainen wrote:
>
> That's not the only alternative. The other alternative, as I mentioned, is
> to
> use goto.
>
>
goto's not a perfect replacement: goto is illegal in constexpr functions,
whereas break and continue are legal.  This asymmetry is what caused me to
bring this issue up again a few months ago.

Melissa

--

---
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 email 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-proposals/.

------=_Part_188_949966620.1420596613278
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, January 4, 2015 8:09:25 PM UTC-8, Ville Voutila=
inen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">That's not the only=
 alternative. The other alternative, as I mentioned, is to
<br>use goto.
<br>
<br></blockquote><div><br><span style=3D"font-family: courier new,monospace=
;">goto</span>'s not a perfect replacement: <span style=3D"font-family: cou=
rier new,monospace;">goto</span> is illegal in <span style=3D"font-family: =
courier new,monospace;">constexpr</span> functions, whereas <span style=3D"=
font-family: courier new,monospace;">break</span> and <span style=3D"font-f=
amily: courier new,monospace;">continue</span> are legal.&nbsp; This asymme=
try is what caused me to bring this issue up again a few months ago.<br><br=
>Melissa<br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_188_949966620.1420596613278--
------=_Part_187_888974457.1420596613278--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 7 Jan 2015 04:14:02 +0200
Raw View
On 7 January 2015 at 04:10, Myriachan <myriachan@gmail.com> wrote:
> On Sunday, January 4, 2015 8:09:25 PM UTC-8, Ville Voutilainen wrote:
>>
>> That's not the only alternative. The other alternative, as I mentioned, is
>> to
>> use goto.
>>
>
> goto's not a perfect replacement: goto is illegal in constexpr functions,
> whereas break and continue are legal.  This asymmetry is what caused me to
> bring this issue up again a few months ago.


For what it's worth, I plan to propose lifting that constexpr
restriction for gotos.

--

---
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 email 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-proposals/.

.


Author: Matthew Fioravante <fmatthew5876@gmail.com>
Date: Tue, 13 Jan 2015 13:02:35 -0800 (PST)
Raw View
------=_Part_5076_949666560.1421182955116
Content-Type: multipart/alternative;
 boundary="----=_Part_5077_1361328637.1421182955116"

------=_Part_5077_1361328637.1421182955116
Content-Type: text/plain; charset=UTF-8

A multi break has some advantages over goto and some disadvantages.

Pros of break:
- goto requires creating a label name. If this name changes then you must
modify all of the goto statements. Using break we don't have any names on
dependencies.
- goto is somewhat fragile in that you could easily add some code before
the label which would then get skipped, with break this bug is impossible
to write.

Pros of goto:
- From first glance it can be hard to see in the code where the break
statement will take you. Searching for the label with goto is much clearer.
This could be fixed within an IDE which shows you visually where the break
will jump to.
- break N; is dependent on the level of loop nesting. If you add or remove
a loop later, all of your breaks stop working correctly and need to be
adjusted.
- No goto in constexpr functions, but this could be fixed.

Overall it really doesn't seem like a big deal, especially with the modern
guideline of avoiding raw loops in favor of algorithms. Usually when I have
multiple nested loops it means I need to start splitting up my logic into
separate functions.

--

---
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 email 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-proposals/.

------=_Part_5077_1361328637.1421182955116
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>A multi break has some advantages over goto and some =
disadvantages. </div><div>&nbsp;</div><div>Pros of break:</div><div>- goto =
requires creating a label name. If this name changes then you must modify a=
ll of the goto statements. Using break we don't have any names on dependenc=
ies.</div><div>- goto is somewhat fragile in that you could easily add some=
 code before the label which would then get skipped, with break this bug is=
 impossible to write.</div><div>&nbsp;</div><div>Pros of goto:</div><div>- =
From first glance it can be hard to see in the code&nbsp;where the break st=
atement will take you. Searching for the label with goto is much clearer. T=
his could be fixed within an IDE which shows you visually where the break w=
ill jump to.</div><div>- break N; is dependent on the level of loop nesting=
.. If you add or remove a loop later, all of your breaks stop working correc=
tly and need to be adjusted.</div><div>- No goto in constexpr functions, bu=
t this could be fixed.</div><div>&nbsp;</div><div>Overall it really doesn't=
 seem like a big deal, especially with the modern guideline of avoiding raw=
 loops in favor of algorithms. Usually when I have multiple nested loops it=
 means I need to start splitting up my logic into separate functions.</div>=
</div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_5077_1361328637.1421182955116--
------=_Part_5076_949666560.1421182955116--

.


Author: Leo Heinsaar <leoheinsaar@gmail.com>
Date: Wed, 14 Jan 2015 02:22:33 -0800 (PST)
Raw View
------=_Part_159_455050438.1421230953076
Content-Type: multipart/alternative;
 boundary="----=_Part_160_843444499.1421230953076"

------=_Part_160_843444499.1421230953076
Content-Type: text/plain; charset=UTF-8

On Wednesday, January 14, 2015 at 1:02:35 AM UTC+4, Matthew Fioravante
wrote:
>
> A multi break has some advantages over goto and some disadvantages.
>
> Pros of break:
> - goto requires creating a label name. If this name changes then you must
> modify all of the goto statements. Using break we don't have any names on
> dependencies.
> - goto is somewhat fragile in that you could easily add some code before
> the label which would then get skipped, with break this bug is impossible
> to write.
>
> Pros of goto:
> - From first glance it can be hard to see in the code where the break
> statement will take you. Searching for the label with goto is much clearer.
> This could be fixed within an IDE which shows you visually where the break
> will jump to.
> - break N; is dependent on the level of loop nesting. If you add or remove
> a loop later, all of your breaks stop working correctly and need to be
> adjusted.
> - No goto in constexpr functions, but this could be fixed.
>

Can't resist mentioning that a guy in one of the companies I worked for,
who was in favor of goto and promoted its valid use, ended up being known
as "the goto person" of our company :-)

Leo

--

---
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 email 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-proposals/.

------=_Part_160_843444499.1421230953076
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, January 14, 2015 at 1:02:35 AM UTC+4, Matthe=
w Fioravante wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><div>A multi break has some advantages over goto and some disadvantag=
es. </div><div>&nbsp;</div><div>Pros of break:</div><div>- goto requires cr=
eating a label name. If this name changes then you must modify all of the g=
oto statements. Using break we don't have any names on dependencies.</div><=
div>- goto is somewhat fragile in that you could easily add some code befor=
e the label which would then get skipped, with break this bug is impossible=
 to write.</div><div>&nbsp;</div><div>Pros of goto:</div><div>- From first =
glance it can be hard to see in the code&nbsp;where the break statement wil=
l take you. Searching for the label with goto is much clearer. This could b=
e fixed within an IDE which shows you visually where the break will jump to=
..</div><div>- break N; is dependent on the level of loop nesting. If you ad=
d or remove a loop later, all of your breaks stop working correctly and nee=
d to be adjusted.</div><div>- No goto in constexpr functions, but this coul=
d be fixed.</div></div></blockquote><div><br></div><div>Can't resist mentio=
ning that a guy in one of the companies I worked for, who was in favor of g=
oto and promoted its valid use, ended up being known as "the goto person" o=
f our company :-)</div><div><br></div><div>Leo</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_160_843444499.1421230953076--
------=_Part_159_455050438.1421230953076--

.


Author: Myriachan <myriachan@gmail.com>
Date: Wed, 14 Jan 2015 12:35:42 -0800 (PST)
Raw View
------=_Part_127_1344159293.1421267742277
Content-Type: multipart/alternative;
 boundary="----=_Part_128_1904754658.1421267742277"

------=_Part_128_1904754658.1421267742277
Content-Type: text/plain; charset=UTF-8

On Tuesday, January 13, 2015 at 1:02:35 PM UTC-8, Matthew Fioravante wrote:
>
> A multi break has some advantages over goto and some disadvantages.
>
> Pros of break:
> - goto requires creating a label name. If this name changes then you must
> modify all of the goto statements. Using break we don't have any names on
> dependencies.
> - goto is somewhat fragile in that you could easily add some code before
> the label which would then get skipped, with break this bug is impossible
> to write.
>
> Pros of goto:
> - From first glance it can be hard to see in the code where the break
> statement will take you. Searching for the label with goto is much clearer.
> This could be fixed within an IDE which shows you visually where the break
> will jump to.
> - break N; is dependent on the level of loop nesting. If you add or remove
> a loop later, all of your breaks stop working correctly and need to be
> adjusted.
> - No goto in constexpr functions, but this could be fixed.
>
> Overall it really doesn't seem like a big deal, especially with the modern
> guideline of avoiding raw loops in favor of algorithms. Usually when I have
> multiple nested loops it means I need to start splitting up my logic into
> separate functions.
>

The third option, labeled break/continue, has the same advantages listed
above as goto, plus these pros:
- It's a syntax that an existing language with C-derived syntax, Java,
already implements.
- It already would work in constexpr functions.
- It doesn't require an empty statement if you want to do a "continue":
it's clearer what you intend to do if you want to continue an outer loop.
- It's more obvious what it means than "break 2;", though admittedly less
obvious than "goto".

Melissa

--

---
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 email 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-proposals/.

------=_Part_128_1904754658.1421267742277
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, January 13, 2015 at 1:02:35 PM UTC-8, Matthew =
Fioravante wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>A multi break has some advantages over goto and some disadvantages=
.. </div><div>&nbsp;</div><div>Pros of break:</div><div>- goto requires crea=
ting a label name. If this name changes then you must modify all of the got=
o statements. Using break we don't have any names on dependencies.</div><di=
v>- goto is somewhat fragile in that you could easily add some code before =
the label which would then get skipped, with break this bug is impossible t=
o write.</div><div>&nbsp;</div><div>Pros of goto:</div><div>- From first gl=
ance it can be hard to see in the code&nbsp;where the break statement will =
take you. Searching for the label with goto is much clearer. This could be =
fixed within an IDE which shows you visually where the break will jump to.<=
/div><div>- break N; is dependent on the level of loop nesting. If you add =
or remove a loop later, all of your breaks stop working correctly and need =
to be adjusted.</div><div>- No goto in constexpr functions, but this could =
be fixed.</div><div>&nbsp;</div><div>Overall it really doesn't seem like a =
big deal, especially with the modern guideline of avoiding raw loops in fav=
or of algorithms. Usually when I have multiple nested loops it means I need=
 to start splitting up my logic into separate functions.</div></div></block=
quote><div><br>The third option, labeled break/continue, has the same advan=
tages listed above as goto, plus these pros:<br>- It's a syntax that an exi=
sting language with C-derived syntax, Java, already implements.<br>- It alr=
eady would work in constexpr functions.<br>- It doesn't require an empty st=
atement if you want to do a "continue": it's clearer what you intend to do =
if you want to continue an outer loop.<br>- It's more obvious what it means=
 than "break 2;", though admittedly less obvious than "goto".<br><br>Meliss=
a<br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_128_1904754658.1421267742277--
------=_Part_127_1344159293.1421267742277--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Thu, 15 Jan 2015 06:40:11 +0000
Raw View
Other pros of break:
- it is structured
- no spaghetti coding
I disagree regarding goto being clearer.

On 1/14/15, Myriachan <myriachan@gmail.com> wrote:
> On Tuesday, January 13, 2015 at 1:02:35 PM UTC-8, Matthew Fioravante wrote:
>>
>> A multi break has some advantages over goto and some disadvantages.
>>
>> Pros of break:
>> - goto requires creating a label name. If this name changes then you must
>>
>> modify all of the goto statements. Using break we don't have any names on
>>
>> dependencies.
>> - goto is somewhat fragile in that you could easily add some code before
>> the label which would then get skipped, with break this bug is impossible
>>
>> to write.
>>
>> Pros of goto:
>> - From first glance it can be hard to see in the code where the break
>> statement will take you. Searching for the label with goto is much
>> clearer.
>> This could be fixed within an IDE which shows you visually where the break
>>
>> will jump to.
>> - break N; is dependent on the level of loop nesting. If you add or remove
>>
>> a loop later, all of your breaks stop working correctly and need to be
>> adjusted.
>> - No goto in constexpr functions, but this could be fixed.
>>
>> Overall it really doesn't seem like a big deal, especially with the modern
>>
>> guideline of avoiding raw loops in favor of algorithms. Usually when I
>> have
>> multiple nested loops it means I need to start splitting up my logic into
>>
>> separate functions.
>>
>
> The third option, labeled break/continue, has the same advantages listed
> above as goto, plus these pros:
> - It's a syntax that an existing language with C-derived syntax, Java,
> already implements.
> - It already would work in constexpr functions.
> - It doesn't require an empty statement if you want to do a "continue":
> it's clearer what you intend to do if you want to continue an outer loop.
> - It's more obvious what it means than "break 2;", though admittedly less
> obvious than "goto".
>
> Melissa
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

.


Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Thu, 15 Jan 2015 14:33:05 -0500
Raw View
--001a11397238127d51050cb5ee4e
Content-Type: text/plain; charset=UTF-8

'break Label;' and 'continue Label;' are better than 'break n;' and
'continue n;' because they precisely designate the loop, and will not break
if extra loops are interposed.

On Thu, Jan 15, 2015 at 1:40 AM, Douglas Boffey <douglas.boffey@gmail.com>
wrote:

> Other pros of break:
> - it is structured
> - no spaghetti coding
> I disagree regarding goto being clearer.
>
> On 1/14/15, Myriachan <myriachan@gmail.com> wrote:
> > On Tuesday, January 13, 2015 at 1:02:35 PM UTC-8, Matthew Fioravante
> wrote:
> >>
> >> A multi break has some advantages over goto and some disadvantages.
> >>
> >> Pros of break:
> >> - goto requires creating a label name. If this name changes then you
> must
> >>
> >> modify all of the goto statements. Using break we don't have any names
> on
> >>
> >> dependencies.
> >> - goto is somewhat fragile in that you could easily add some code before
> >> the label which would then get skipped, with break this bug is
> impossible
> >>
> >> to write.
> >>
> >> Pros of goto:
> >> - From first glance it can be hard to see in the code where the break
> >> statement will take you. Searching for the label with goto is much
> >> clearer.
> >> This could be fixed within an IDE which shows you visually where the
> break
> >>
> >> will jump to.
> >> - break N; is dependent on the level of loop nesting. If you add or
> remove
> >>
> >> a loop later, all of your breaks stop working correctly and need to be
> >> adjusted.
> >> - No goto in constexpr functions, but this could be fixed.
> >>
> >> Overall it really doesn't seem like a big deal, especially with the
> modern
> >>
> >> guideline of avoiding raw loops in favor of algorithms. Usually when I
> >> have
> >> multiple nested loops it means I need to start splitting up my logic
> into
> >>
> >> separate functions.
> >>
> >
> > The third option, labeled break/continue, has the same advantages listed
> > above as goto, plus these pros:
> > - It's a syntax that an existing language with C-derived syntax, Java,
> > already implements.
> > - It already would work in constexpr functions.
> > - It doesn't require an empty statement if you want to do a "continue":
> > it's clearer what you intend to do if you want to continue an outer loop.
> > - It's more obvious what it means than "break 2;", though admittedly less
> > obvious than "goto".
> >
> > Melissa
> >
> > --
> >
> > ---
> > 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
> > email 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-proposals/.
> >
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

--001a11397238127d51050cb5ee4e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&#39;break Label;&#39; and &#39;continue Label;&#39; are b=
etter than &#39;break n;&#39; and &#39;continue n;&#39; because they precis=
ely designate the loop, and will not break if extra loops are interposed.</=
div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Jan 1=
5, 2015 at 1:40 AM, Douglas Boffey <span dir=3D"ltr">&lt;<a href=3D"mailto:=
douglas.boffey@gmail.com" target=3D"_blank">douglas.boffey@gmail.com</a>&gt=
;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex">Other pros of break:<br>
- it is structured<br>
- no spaghetti coding<br>
I disagree regarding goto being clearer.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
On 1/14/15, Myriachan &lt;<a href=3D"mailto:myriachan@gmail.com">myriachan@=
gmail.com</a>&gt; wrote:<br>
&gt; On Tuesday, January 13, 2015 at 1:02:35 PM UTC-8, Matthew Fioravante w=
rote:<br>
&gt;&gt;<br>
&gt;&gt; A multi break has some advantages over goto and some disadvantages=
..<br>
&gt;&gt;<br>
&gt;&gt; Pros of break:<br>
&gt;&gt; - goto requires creating a label name. If this name changes then y=
ou must<br>
&gt;&gt;<br>
&gt;&gt; modify all of the goto statements. Using break we don&#39;t have a=
ny names on<br>
&gt;&gt;<br>
&gt;&gt; dependencies.<br>
&gt;&gt; - goto is somewhat fragile in that you could easily add some code =
before<br>
&gt;&gt; the label which would then get skipped, with break this bug is imp=
ossible<br>
&gt;&gt;<br>
&gt;&gt; to write.<br>
&gt;&gt;<br>
&gt;&gt; Pros of goto:<br>
&gt;&gt; - From first glance it can be hard to see in the code where the br=
eak<br>
&gt;&gt; statement will take you. Searching for the label with goto is much=
<br>
&gt;&gt; clearer.<br>
&gt;&gt; This could be fixed within an IDE which shows you visually where t=
he break<br>
&gt;&gt;<br>
&gt;&gt; will jump to.<br>
&gt;&gt; - break N; is dependent on the level of loop nesting. If you add o=
r remove<br>
&gt;&gt;<br>
&gt;&gt; a loop later, all of your breaks stop working correctly and need t=
o be<br>
&gt;&gt; adjusted.<br>
&gt;&gt; - No goto in constexpr functions, but this could be fixed.<br>
&gt;&gt;<br>
&gt;&gt; Overall it really doesn&#39;t seem like a big deal, especially wit=
h the modern<br>
&gt;&gt;<br>
&gt;&gt; guideline of avoiding raw loops in favor of algorithms. Usually wh=
en I<br>
&gt;&gt; have<br>
&gt;&gt; multiple nested loops it means I need to start splitting up my log=
ic into<br>
&gt;&gt;<br>
&gt;&gt; separate functions.<br>
&gt;&gt;<br>
&gt;<br>
&gt; The third option, labeled break/continue, has the same advantages list=
ed<br>
&gt; above as goto, plus these pros:<br>
&gt; - It&#39;s a syntax that an existing language with C-derived syntax, J=
ava,<br>
&gt; already implements.<br>
&gt; - It already would work in constexpr functions.<br>
&gt; - It doesn&#39;t require an empty statement if you want to do a &quot;=
continue&quot;:<br>
&gt; it&#39;s clearer what you intend to do if you want to continue an oute=
r loop.<br>
&gt; - It&#39;s more obvious what it means than &quot;break 2;&quot;, thoug=
h admittedly less<br>
&gt; obvious than &quot;goto&quot;.<br>
&gt;<br>
&gt; Melissa<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; ---<br>
&gt; You received this message because you are subscribed to the Google Gro=
ups<br>
&gt; &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
&gt; To unsubscribe from this group and stop receiving emails from it, send=
 an<br>
&gt; email to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std=
-proposals+unsubscribe@isocpp.org</a>.<br>
&gt; To post to this group, send email to <a href=3D"mailto:std-proposals@i=
socpp.org">std-proposals@isocpp.org</a>.<br>
&gt; Visit this group at<br>
&gt; <a href=3D"http://groups.google.com/a/isocpp.org/group/std-proposals/"=
 target=3D"_blank">http://groups.google.com/a/isocpp.org/group/std-proposal=
s/</a>.<br>
&gt;<br>
<br>
--<br>
<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11397238127d51050cb5ee4e--

.


Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Thu, 15 Jan 2015 12:44:17 -0800 (PST)
Raw View
------=_Part_134_1851959029.1421354657755
Content-Type: multipart/alternative;
 boundary="----=_Part_135_247420785.1421354657755"

------=_Part_135_247420785.1421354657755
Content-Type: text/plain; charset=UTF-8

It is a funny theme. So here is my five cents.

What about

for(M){
    for(N){
        for(K){
            if(condition is true){
                auto break ;  // exit from three loops
            }
        }
    }
}


On Sunday, January 4, 2015 at 7:46:50 PM UTC+3, Rupesh Yadav wrote:

> Simple case: if *condition* is satisfied i want to break from all loops.
>
> Example :
>
> for(M){
>     for(N){
>         for(K){
>             if(condition is true){
>                 flag = 1;
>                 break;
>             }
>         }
>         if(flag==1) //  worst case checking MxN times
>         break;
>     }
>     if(flag==1) // checking M times
>         break;
> }
>
> We can simply do like this:
>
> for(M){
>     for(N){
>         for(K){
>             if(condition is true){
>                 break break break;  // exit from three loops
>             }
>         }
>     }
> }
>
> We can eliminate :
> 1. No extra *flag* variables ( less memory )
> 2. No need to put unnecessary *if(condition)* ( speed up )
>
> Correct me if there is something wrong or there is already an option to
> optimize it.
>

--

---
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 email 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-proposals/.

------=_Part_135_247420785.1421354657755
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>It is a funny theme. So here is my five cents.</div><=
div><br></div><div>What about</div><div>&nbsp;</div><div>for(M){<br>&nbsp;&=
nbsp; &nbsp;for(N){&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &=
nbsp;for(K){&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&n=
bsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(condition is true=
){<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
 &nbsp;auto break&nbsp;;&nbsp; // exit from three loops<br>&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbs=
p; &nbsp;}<br>&nbsp;&nbsp; &nbsp;}<br>}<br><br><br>On Sunday, January 4, 20=
15 at 7:46:50 PM UTC+3, Rupesh Yadav wrote:</div><blockquote class=3D"gmail=
_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-=
color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid=
;"><div dir=3D"ltr">Simple case: if <b>condition</b> is satisfied i want to=
 break from all loops.<br><br>Example : <br><br>for(M){<br>&nbsp;&nbsp; &nb=
sp;for(N){&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(=
K){&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp=
; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(condition is true){<br>&nb=
sp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fl=
ag =3D 1;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp=
;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&n=
bsp;&nbsp; &nbsp;if(flag=3D=3D1) //&nbsp;  worst case checking MxN times<br=
>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;}<br>&n=
bsp;&nbsp; &nbsp;if(flag=3D=3D1) // checking M times<br>&nbsp;&nbsp; &nbsp;=
&nbsp;&nbsp; &nbsp;break;<br>}<br><br>We can simply do like this:<br><br>fo=
r(M){<br>&nbsp;&nbsp; &nbsp;for(N){&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp;for(K){&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nb=
sp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(c=
ondition is true){<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp; &nbsp;break break break;&nbsp; // exit from three loops<br=
>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp;=
 &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;}<br>}<br><br>We can elim=
inate :<br>1. No extra <b>flag</b> variables ( less memory )<br>2. No need =
to put unnecessary <b>if(condition)</b> ( speed up )<br><br>Correct me if t=
here is something wrong or there is already an option to optimize it.</div>=
</blockquote></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_135_247420785.1421354657755--
------=_Part_134_1851959029.1421354657755--

.


Author: =?UTF-8?Q?R=C3=B3bert_D=C3=A1vid?= <lrdxgm@gmail.com>
Date: Sun, 25 Jan 2015 11:50:43 -0800 (PST)
Raw View
------=_Part_206_1667756775.1422215443950
Content-Type: multipart/alternative;
 boundary="----=_Part_207_1031556781.1422215443951"

------=_Part_207_1031556781.1422215443951
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



2015. janu=C3=A1r 15., cs=C3=BCt=C3=B6rt=C3=B6k 21:44:17 UTC+1 id=C5=91pont=
ban Vlad from Moscow a=20
k=C3=B6vetkez=C5=91t =C3=ADrta:
>
> It is a funny theme. So here is my five cents.
>
> What about
> =20
> for(M){
>     for(N){   =20
>         for(K){           =20
>             if(condition is true){
>                 auto break ;  // exit from three loops
>             }
>         }
>     }
> }
>

What about
auto find_MNK() {
  for (M)
    for (N)
      for (K)
        if (condition is true)
          return { whatever you need };
}
and calling that function in the appropriate place(s)?

All these break label / break n; constructs just encourage spaghetti code=
=20
and fail to make the code more readable than using functions (make the=20
function (force-)inline if you are worried about call overhead..). Also=20
doing so you might also show that all you actually need is a call something=
=20
like std::find_if or std::rotate or any=20
standard/boost/insert_favorite_library_here function instead.

Or create a lambda and call it immediately if you 'need' code locality.

Regards,
Robert

--=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/.

------=_Part_207_1031556781.1422215443951
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>2015. janu=C3=A1r 15., cs=C3=BCt=C3=B6rt=C3=B6k 21=
:44:17 UTC+1 id=C5=91pontban Vlad from Moscow a k=C3=B6vetkez=C5=91t =C3=AD=
rta:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex=
;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>It i=
s a funny theme. So here is my five cents.</div><div><br></div><div>What ab=
out</div><div>&nbsp;</div><div>for(M){<br>&nbsp;&nbsp; &nbsp;for(N){&nbsp;&=
nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(K){&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp; &nbsp;if(condition is true){<br>&nbsp;&nbsp; &nbsp;&=
nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;auto break&nbsp;;&n=
bsp; // exit from three loops<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp;=
 &nbsp;}<br>}</div></div></blockquote><div><br>What about<br><div class=3D"=
prettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: r=
gb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: break=
-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> find_MNK</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>&nbsp; </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">for</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">M</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">for</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">N</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br>&nbsp; &nbsp; &nbsp; </span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">for</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">K</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &=
nbsp; &nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">if</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify">condition </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">is</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">true</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">return</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> whatever you need </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">};</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br></span></div></code></div>and calling that function=
 in the appropriate place(s)?<br><br>All these break label / break n; const=
ructs just encourage spaghetti code and fail to make the code more readable=
 than using functions (make the function (force-)inline if you are worried =
about call overhead..). Also doing so you might also show that all you actu=
ally need is a call something like std::find_if or std::rotate or any stand=
ard/boost/insert_favorite_library_here function instead.<br><br>Or create a=
 lambda and call it immediately if you 'need' code locality.<br><br>Regards=
,<br>Robert<br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_207_1031556781.1422215443951--
------=_Part_206_1667756775.1422215443950--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Sun, 25 Jan 2015 22:09:36 +0000
Raw View
How can

L1: for (auto i:foo)
  L2: for (auto j:bar) {
    for (auto k:baz)
      break L2;
    break L1;
  }

be done?

On 1/25/15, R=C3=B3bert D=C3=A1vid <lrdxgm@gmail.com> wrote:
>
>
> 2015. janu=C3=A1r 15., cs=C3=BCt=C3=B6rt=C3=B6k 21:44:17 UTC+1 id=C5=91po=
ntban Vlad from Moscow a
> k=C3=B6vetkez=C5=91t =C3=ADrta:
>>
>> It is a funny theme. So here is my five cents.
>>
>> What about
>>
>> for(M){
>>     for(N){
>>         for(K){
>>             if(condition is true){
>>                 auto break ;  // exit from three loops
>>             }
>>         }
>>     }
>> }
>>
>
> What about
> auto find_MNK() {
>   for (M)
>     for (N)
>       for (K)
>         if (condition is true)
>           return { whatever you need };
> }
> and calling that function in the appropriate place(s)?
>
> All these break label / break n; constructs just encourage spaghetti code
> and fail to make the code more readable than using functions (make the
> function (force-)inline if you are worried about call overhead..). Also
> doing so you might also show that all you actually need is a call somethi=
ng
>
> like std::find_if or std::rotate or any
> standard/boost/insert_favorite_library_here function instead.
>
> Or create a lambda and call it immediately if you 'need' code locality.
>
> Regards,
> Robert
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--=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/.

.


Author: gmisocpp@gmail.com
Date: Sun, 25 Jan 2015 15:15:40 -0800 (PST)
Raw View
------=_Part_2989_110384965.1422227740517
Content-Type: multipart/alternative;
 boundary="----=_Part_2990_1961719394.1422227740517"

------=_Part_2990_1961719394.1422227740517
Content-Type: text/plain; charset=UTF-8

Should we not just get over the peer pressure of being labelled (ho ho ho)
the 'goto person' by colleagues and just use goto? It's in the language for
a reason. I say use it when it is appropriate and say to hell with the
snipers?

If the ioscpp FAQ is updated too to approve that then people who are
bucking under pressure can point to that and say 'look it's ok, even the
experts say it's ok to use goto sometimes'.

--

---
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 email 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-proposals/.

------=_Part_2990_1961719394.1422227740517
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Should we not&nbsp;just get over the peer pressure of=
 being labelled (ho ho ho) the 'goto person' by colleagues and just use got=
o?&nbsp;It's in the language for a reason. I&nbsp;say use it when it is app=
ropriate and say to hell with the snipers?</div><div><br></div><div>If&nbsp=
;the&nbsp;ioscpp FAQ is updated too to approve that&nbsp;then&nbsp;people w=
ho are bucking under pressure&nbsp;can point to that and say 'look it's ok,=
 even the experts say it's ok to use goto sometimes'.</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_2990_1961719394.1422227740517--
------=_Part_2989_110384965.1422227740517--

.


Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Mon, 26 Jan 2015 13:56:26 -0500
Raw View
--001a11c2f01a327557050d92b35d
Content-Type: text/plain; charset=UTF-8

But it's not appropriate to use goto to exit or continue a loop.  The
target of the goto is not attached to the loop, but is an arbitrary null
statement at the end of the loop or just past it.  That's awkward, and
possibly error prone if code changers forget to keep it in the right
place.  On the other hand, labeling the loop and then referring to that
label in a break or continue says exactly what it is you want to do, and
the label is attached to the loop, not to some other statement.  It's
beyond silly not to have this in the language.

This is one of those times where the answer seems so obvious that
proponents can't fathom what the opponents are on about.  (Unfortunately
C++ seems full of cases like this.  My particular one is fixed order of
evaluation.)  It's useless to keep arguing about it because the opponents
just will not see the light.  If they could be overpowered (by a vote, of
course, we're all gentlefolk here) that would work, but since the standards
process goes by consensus rather than majority, that's not going to happen
either.  So we wind up with the same daft discussions year after year, and
nothing changes.

On Sun, Jan 25, 2015 at 6:15 PM, <gmisocpp@gmail.com> wrote:

> Should we not just get over the peer pressure of being labelled (ho ho ho)
> the 'goto person' by colleagues and just use goto? It's in the language for
> a reason. I say use it when it is appropriate and say to hell with the
> snipers?
>
> If the ioscpp FAQ is updated too to approve that then people who are
> bucking under pressure can point to that and say 'look it's ok, even the
> experts say it's ok to use goto sometimes'.
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

--001a11c2f01a327557050d92b35d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">But it&#39;s not appropriate to use goto to exit or contin=
ue a loop.=C2=A0 The target of the goto is not attached to the loop, but is=
 an arbitrary null statement at the end of the loop or just past it.=C2=A0 =
That&#39;s awkward, and possibly error prone if code changers forget to kee=
p it in the right place.=C2=A0 On the other hand, labeling the loop and the=
n referring to that label in a break or continue says exactly what it is yo=
u want to do, and the label is attached to the loop, not to some other stat=
ement.=C2=A0 It&#39;s beyond silly not to have this in the language.<br><br=
>This is one of those times where the answer seems so obvious that proponen=
ts can&#39;t fathom what the opponents are on about. =C2=A0(Unfortunately C=
++ seems full of cases like this.=C2=A0 My particular one is fixed order of=
 evaluation.) =C2=A0It&#39;s useless to keep arguing about it because the o=
pponents just will not see the light.=C2=A0 If they could be overpowered (b=
y a vote, of course, we&#39;re all gentlefolk here) that would work, but si=
nce the standards process goes by consensus rather than majority, that&#39;=
s not going to happen either.=C2=A0 So we wind up with the same daft discus=
sions year after year, and nothing changes.</div><div class=3D"gmail_extra"=
><br><div class=3D"gmail_quote">On Sun, Jan 25, 2015 at 6:15 PM,  <span dir=
=3D"ltr">&lt;<a href=3D"mailto:gmisocpp@gmail.com" target=3D"_blank">gmisoc=
pp@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr"><div>Should we not=C2=A0just get over the peer pressure of being=
 labelled (ho ho ho) the &#39;goto person&#39; by colleagues and just use g=
oto?=C2=A0It&#39;s in the language for a reason. I=C2=A0say use it when it =
is appropriate and say to hell with the snipers?</div><div><br></div><div>I=
f=C2=A0the=C2=A0ioscpp FAQ is updated too to approve that=C2=A0then=C2=A0pe=
ople who are bucking under pressure=C2=A0can point to that and say &#39;loo=
k it&#39;s ok, even the experts say it&#39;s ok to use goto sometimes&#39;.=
</div></div><div class=3D"HOEnZb"><div class=3D"h5">

<p></p>

-- <br>
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c2f01a327557050d92b35d--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 21:04:36 +0200
Raw View
On 26 January 2015 at 20:56, Hyman Rosen <hyman.rosen@gmail.com> wrote:
> But it's not appropriate to use goto to exit or continue a loop.  The target
> of the goto is not attached to the loop, but is an arbitrary null statement
> at the end of the loop or just past it.  That's awkward, and possibly error
> prone if code changers forget to keep it in the right place.  On the other
> hand, labeling the loop and then referring to that label in a break or
> continue says exactly what it is you want to do, and the label is attached
> to the loop, not to some other statement.  It's beyond silly not to have
> this in the language.

Thus far nobody has demonstrated a convincing reason to add such a facility,
given the doubt of nested loops being common/important and the added doubt of
lambdas and goto not being a decent alternative solution.

> This is one of those times where the answer seems so obvious that proponents
> can't fathom what the opponents are on about.  (Unfortunately C++ seems full
> of cases like this.  My particular one is fixed order of evaluation.)  It's
> useless to keep arguing about it because the opponents just will not see the
> light.  If they could be overpowered (by a vote, of course, we're all
> gentlefolk here) that would work, but since the standards process goes by
> consensus rather than majority, that's not going to happen either.  So we
> wind up with the same daft discussions year after year, and nothing changes.

Well, http://cplusplus.github.io/EWG/ewg-active.html#158 was encouraged
to go forward.

--

---
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 email 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-proposals/.

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Mon, 26 Jan 2015 19:31:11 +0000
Raw View
I, for one, have no hesitation in using nested loops, and do so extensively.

On 1/26/15, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> On 26 January 2015 at 20:56, Hyman Rosen <hyman.rosen@gmail.com> wrote:
>> But it's not appropriate to use goto to exit or continue a loop.  The
>> target
>> of the goto is not attached to the loop, but is an arbitrary null
>> statement
>> at the end of the loop or just past it.  That's awkward, and possibly
>> error
>> prone if code changers forget to keep it in the right place.  On the
>> other
>> hand, labeling the loop and then referring to that label in a break or
>> continue says exactly what it is you want to do, and the label is
>> attached
>> to the loop, not to some other statement.  It's beyond silly not to have
>> this in the language.
>
> Thus far nobody has demonstrated a convincing reason to add such a
> facility,
> given the doubt of nested loops being common/important and the added doubt
> of
> lambdas and goto not being a decent alternative solution.
>
>> This is one of those times where the answer seems so obvious that
>> proponents
>> can't fathom what the opponents are on about.  (Unfortunately C++ seems
>> full
>> of cases like this.  My particular one is fixed order of evaluation.)
>> It's
>> useless to keep arguing about it because the opponents just will not see
>> the
>> light.  If they could be overpowered (by a vote, of course, we're all
>> gentlefolk here) that would work, but since the standards process goes by
>> consensus rather than majority, that's not going to happen either.  So we
>> wind up with the same daft discussions year after year, and nothing
>> changes.
>
> Well, http://cplusplus.github.io/EWG/ewg-active.html#158 was encouraged
> to go forward.
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 21:37:48 +0200
Raw View
On 26 January 2015 at 21:31, Douglas Boffey <douglas.boffey@gmail.com> wrote:
> I, for one, have no hesitation in using nested loops, and do so extensively.

That's nice. That, however, doesn't constitute a convincing reason to
standardize
labeled breaks.

--

---
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 email 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-proposals/.

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Mon, 26 Jan 2015 14:41:49 -0500
Raw View
On 2015-01-26 14:04, Ville Voutilainen wrote:
> Thus far nobody has demonstrated a convincing reason to add such a facility,
> given the doubt of nested loops being common/important and the added doubt of
> lambdas and goto not being a decent alternative solution.

At least the first part of that is silly. Nested loops are quite common.
Just offhand, I can think of two that I wrote last night (and if I
actually look at the code, I find more), and I could easily find a bunch
of places I'm iterating over a 2D data structure by means of nested loops.

What's harder to qualify is how often there are loops for which being
able to break out of multiple levels is needed, since the lack of
ability to do so leads to programmers tending to avoid such situations.
Therefore it's hard to say how much more common they would be if they
weren't problematic in this fashion.

--
Matthew

--

---
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 email 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-proposals/.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 21:53:05 +0200
Raw View
On 26 January 2015 at 21:41, Matthew Woehlke
<mw_triad@users.sourceforge.net> wrote:
> On 2015-01-26 14:04, Ville Voutilainen wrote:
>> Thus far nobody has demonstrated a convincing reason to add such a facility,
>> given the doubt of nested loops being common/important and the added doubt of
>> lambdas and goto not being a decent alternative solution.
> At least the first part of that is silly. Nested loops are quite common.

I have no trouble finding people who will state the polar opposite.

> What's harder to qualify is how often there are loops for which being
> able to break out of multiple levels is needed, since the lack of
> ability to do so leads to programmers tending to avoid such situations.

That seems to be what EWG prefers, based on the outcome of N3879.

--

---
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 email 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-proposals/.

.


Author: gmisocpp@gmail.com
Date: Mon, 26 Jan 2015 12:01:34 -0800 (PST)
Raw View
------=_Part_3580_1373187061.1422302494022
Content-Type: multipart/alternative;
 boundary="----=_Part_3581_148179918.1422302494023"

------=_Part_3581_148179918.1422302494023
Content-Type: text/plain; charset=UTF-8



On Tuesday, January 27, 2015 at 7:56:48 AM UTC+13, Hyman Rosen wrote:
>
> But it's not appropriate to use goto to exit or continue a loop.  The
> target of the goto is not attached to the loop, but is an arbitrary null
> statement at the end of the loop or just past it.  That's awkward, and
> possibly error prone if code changers forget to keep it in the right
> place.  On the other hand, labeling the loop and then referring to that
> label in a break or continue says exactly what it is you want to do, and
> the label is attached to the loop, not to some other statement.  It's
> beyond silly not to have this in the language.
>

> This is one of those times where the answer seems so obvious that
> proponents can't fathom what the opponents are on about.
>

I get all that (but then I would think that, that's part of your argument
right). It's just I don't feel I ever remotely often try to continue one
loop from another loop. It's so rare that explicit support for that seems a
waste when goto works well enough for the rarity of the use case for me.

I DO find the need somewhat more often to break a nested loop, but there I
feel I need to stop using loops so often and it's a reminder to me that I
am using loops when I should be using a function call. And in any
case the need isn't crazy often and I feel goto is perfectly good for that
purpose that overall I don't feel I need explicit language support to help
me as it'll just stop me using functions more instead of loops.

The only thing that seems not good about the situation is that when I ever
do use a goto I have to worry that someone will then lecturing me that I
used goto when I should not so I often don't, but I feel they need to get
over themselves and the problem is with them and not me.

But I wouldn't cry if the feature was added, I don't think it would hurt
the language. I just don't want the feature and I'd just rather the
committee worked on other things that I do care about. That latter point is
probably what the majority of the people against this proposal feel. But
I'd be guessing at that point.



>  (Unfortunately C++ seems full of cases like this.  My particular one is
> fixed order of evaluation.)  It's useless to keep arguing about it because
> the opponents just will not see the light.  If they could be overpowered
> (by a vote, of course, we're all gentlefolk here) that would work, but
> since the standards process goes by consensus rather than majority, that's
> not going to happen either.  So we wind up with the same daft discussions
> year after year, and nothing changes.
>

I think people would have agreed with you very strongly in previous years
but right now the language is changing a lot.
But we all have our pet peeves. Mine is uniform initialization. I'd
like some other solution to that problem (e.g. source code translation),
but it's hard to moan meaningfully about other peoples solutions that do
work, even if I feel I don't like them, when my own thoughts aren't
nearly as fully formed or worked on or proven as the ideas that did get
voted in, which is why their ideas got voted in and not mine.

In the end that's seems fair and probably more reasonable than we often
think.


--

---
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 email 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-proposals/.

------=_Part_3581_148179918.1422302494023
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, January 27, 2015 at 7:56:48 AM UTC+13,=
 Hyman Rosen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0=
px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bor=
der-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">But it's n=
ot appropriate to use goto to exit or continue a loop.&nbsp; The target of =
the goto is not attached to the loop, but is an arbitrary null statement at=
 the end of the loop or just past it.&nbsp; That's awkward, and possibly er=
ror prone if code changers forget to keep it in the right place.&nbsp; On t=
he other hand, labeling the loop and then referring to that label in a brea=
k or continue says exactly what it is you want to do, and the label is atta=
ched to the loop, not to some other statement.&nbsp; It's beyond silly not =
to have this in the language.</div></blockquote><blockquote class=3D"gmail_=
quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-c=
olor: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;=
"><div dir=3D"ltr"><br>This is one of those times where the answer seems so=
 obvious that proponents can't fathom what the opponents are on about. </di=
v></blockquote><div><br></div><div><div>I get all that (but then I would th=
ink that,&nbsp;that's part of your argument right). It's just I don't feel =
I ever remotely often try to continue one loop from another loop. It's so r=
are that explicit support for that seems a waste when goto works well enoug=
h for the rarity of the use case for me.</div><div><br></div><div>I&nbsp;DO=
 find the need somewhat more often to&nbsp;break a nested loop, but there I=
 feel I need to stop using loops so often and it's a reminder to me that I =
am using loops when I should be using a function call. And in any case&nbsp=
;the&nbsp;need isn't&nbsp;crazy often and I feel goto is perfectly good for=
 that purpose that overall I don't feel I need explicit language support to=
 help me as it'll just stop me using functions more instead of loops.</div>=
<div><br></div><div>The only thing that seems not good about the situation =
is that when I ever do use a goto I have to worry that someone will then le=
cturing me that I used goto when I should not so I often don't, but&nbsp;I =
feel they need to get over themselves and the problem is with them and not =
me.</div><div><br></div><div>But I wouldn't cry if the feature was added,&n=
bsp;I don't think it would hurt the language. I just don't want the feature=
 and I'd just rather the committee worked on other things that I do care ab=
out. That latter point&nbsp;is probably what the majority of the people aga=
inst this proposal feel. But I'd be guessing at that point.</div><div><br><=
/div></div><div>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"marg=
in: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, =
204); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">&=
nbsp;(Unfortunately C++ seems full of cases like this.&nbsp; My particular =
one is fixed order of evaluation.) &nbsp;It's useless to keep arguing about=
 it because the opponents just will not see the light.&nbsp; If they could =
be overpowered (by a vote, of course, we're all gentlefolk here) that would=
 work, but since the standards process goes by consensus rather than majori=
ty, that's not going to happen either.&nbsp; So we wind up with the same da=
ft discussions year after year, and nothing changes.</div></blockquote><div=
><br></div><div>I think people would have agreed with you very strongly in =
previous years but right now the language is changing a lot.</div><div>But =
we all have our pet peeves. Mine is uniform initialization. I'd like&nbsp;s=
ome other solution to that problem (e.g. source code translation), but it's=
 hard to moan meaningfully about other peoples solutions that do work, even=
 if I feel I don't&nbsp;like them,&nbsp;when my own thoughts aren't nearly&=
nbsp;as fully formed or worked on or proven as the ideas that did get voted=
 in, which is why their ideas&nbsp;got voted in and not mine.</div><div><br=
></div><div>In the end that's seems fair and probably more reasonable than =
we often think.</div><div>&nbsp;</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3581_148179918.1422302494023--
------=_Part_3580_1373187061.1422302494022--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Mon, 26 Jan 2015 20:09:12 +0000
Raw View
One metric as to how useful a feature would be is how often it is
requested. By this, the proposal would win hands down.

On 1/26/15, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> On 26 January 2015 at 21:41, Matthew Woehlke
> <mw_triad@users.sourceforge.net> wrote:
>> On 2015-01-26 14:04, Ville Voutilainen wrote:
>>> Thus far nobody has demonstrated a convincing reason to add such a
>>> facility,
>>> given the doubt of nested loops being common/important and the added
>>> doubt of
>>> lambdas and goto not being a decent alternative solution.
>> At least the first part of that is silly. Nested loops are quite common.
>
> I have no trouble finding people who will state the polar opposite.
>
>> What's harder to qualify is how often there are loops for which being
>> able to break out of multiple levels is needed, since the lack of
>> ability to do so leads to programmers tending to avoid such situations.
>
> That seems to be what EWG prefers, based on the outcome of N3879.
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 22:20:53 +0200
Raw View
On 26 January 2015 at 22:09, Douglas Boffey <douglas.boffey@gmail.com> wrote:
> One metric as to how useful a feature would be is how often it is
> requested. By this, the proposal would win hands down.

Win what? Compared to what? Has it been implemented as an extension?
As an example,
VLAs have. So apparently this "proposal" does not "win" everything "hands down".

--

---
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 email 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-proposals/.

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Mon, 26 Jan 2015 20:28:23 +0000
Raw View
It demonstrates how many people want it!  Read what I said

On 1/26/15, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> On 26 January 2015 at 22:09, Douglas Boffey <douglas.boffey@gmail.com>
> wrote:
>> One metric as to how useful a feature would be is how often it is
>> requested. By this, the proposal would win hands down.
>
> Win what? Compared to what? Has it been implemented as an extension?
> As an example,
> VLAs have. So apparently this "proposal" does not "win" everything "hands
> down".
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

.


Author: gmisocpp@gmail.com
Date: Mon, 26 Jan 2015 12:29:12 -0800 (PST)
Raw View
------=_Part_3628_1110575563.1422304152814
Content-Type: multipart/alternative;
 boundary="----=_Part_3629_1663111264.1422304152814"

------=_Part_3629_1663111264.1422304152814
Content-Type: text/plain; charset=UTF-8


On Tuesday, January 27, 2015 at 9:09:13 AM UTC+13, Douglas Boffey wrote:
>
> One metric as to how useful a feature would be is how often it is
> requested. By this, the proposal would win hands down.
>

It would appear that way (and may even be that way) but when this topic
came up before, it was my personal observation/opinion that the "for this
proposal" crowd were a vocal minority. Sure, the "against this proposal"
crowd was an even smaller minority. But I never perceived broad support for
it regardless.

It seems to me when a proposal comes along with this kind of "backing",
when it finally reaches committee for serious consideration, the silent
broadly against majority come forth and simply kill it off. That seems to
be what happened last time.

Nobody knows the truth until that time comes unless the "no" voters come
forward earlier, assuming they exist and I am right in any of this.

"Properties" also apparently gets a lot of support, but that doesn't sway
the committee either. But I've thought about properties a million
times they are polarising even within myself. I keep trying and failing to
find a way to make them fit convincingly. I want them and loath them at
that same time.

But my point is that not everything that appears popular is as it seems.


--

---
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 email 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-proposals/.

------=_Part_3629_1663111264.1422304152814
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Tuesday, January 27, 2015 at 9:09:13 AM UTC+13, Dou=
glas Boffey wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0p=
x 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bord=
er-left-width: 1px; border-left-style: solid;">One metric as to how useful =
a feature would be is how often it is
<br>requested. By this, the proposal would win hands down.
<br></blockquote><div><br></div><div>It would appear that way (and may even=
 be that way)&nbsp;but when this topic came up before, it was my personal o=
bservation/opinion that the "for this proposal"&nbsp;crowd were a vocal min=
ority.&nbsp;Sure, the "against this proposal" crowd was an even&nbsp;smalle=
r minority. But I never&nbsp;perceived broad support for it regardless.</di=
v><div><br></div><div>It seems to me when a proposal comes along with this =
kind of "backing", when it&nbsp;finally reaches committee for serious consi=
deration, the silent broadly against majority come forth and simply kill it=
 off.&nbsp;That seems to be what happened last time.</div><div><br></div><d=
iv>Nobody knows the truth&nbsp;until that time comes unless the "no" voters=
 come forward earlier, assuming they exist and I am right in any of this.</=
div><div><br></div><div>"Properties"&nbsp;also apparently&nbsp;gets a lot o=
f support, but that doesn't sway the committee either.&nbsp;But I've though=
t about properties a million times&nbsp;they are&nbsp;polarising even&nbsp;=
within myself. I keep trying and failing to find a way to make them fit con=
vincingly. I want them and loath them at that same time.</div><div><br></di=
v><div>But my point is that not everything that appears popular is as it se=
ems.</div><div><br></div><div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3629_1663111264.1422304152814--
------=_Part_3628_1110575563.1422304152814--

.


Author: gmisocpp@gmail.com
Date: Mon, 26 Jan 2015 12:35:36 -0800 (PST)
Raw View
------=_Part_10_1342178774.1422304536987
Content-Type: multipart/alternative;
 boundary="----=_Part_11_830426530.1422304536987"

------=_Part_11_830426530.1422304536987
Content-Type: text/plain; charset=UTF-8



On Tuesday, January 27, 2015 at 9:20:55 AM UTC+13, Ville Voutilainen wrote:
>
> On 26 January 2015 at 22:09, Douglas Boffey <douglas...@gmail.com
> <javascript:>> wrote:
> > One metric as to how useful a feature would be is how often it is
> > requested. By this, the proposal would win hands down.
>
> Win what? Compared to what? Has it been implemented as an extension?
> As an example,
> VLAs have. So apparently this "proposal" does not "win" everything "hands
> down".
>

I think Douglas is talking about "winning" meaning getting into the
language, but I may be wrong.
Assuming we are still talking about labelled loops, does it need to be
implemented in clang or anything.
It's already implemented in java etc. so there doesn't appear to be a need
to implement it in C++.
It just seems to be based on how you can find and interpret the merits from
the results of the use that already exists in Java etc.
And also your own opinions I guess.

We had some results but that failed to convince enough people if anyone to
change sides.

Sorry if I've missed what you guys are talking about here.

--

---
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 email 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-proposals/.

------=_Part_11_830426530.1422304536987
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, January 27, 2015 at 9:20:55 AM UTC+13,=
 Ville Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204=
); border-left-width: 1px; border-left-style: solid;">On 26 January 2015 at=
 22:09, Douglas Boffey &lt;<a onmousedown=3D"this.href=3D'javascript:';retu=
rn true;" onclick=3D"this.href=3D'javascript:';return true;" href=3D"javasc=
ript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"xHzxvSu9=
al0J">douglas...@gmail.com</a>&gt; wrote:
<br>&gt; One metric as to how useful a feature would be is how often it is
<br>&gt; requested. By this, the proposal would win hands down.
<br>
<br>Win what? Compared to what? Has it been implemented as an extension?
<br>As an example,
<br>VLAs have. So apparently this "proposal" does not "win" everything "han=
ds down".
<br></blockquote><div><br></div><div><div>I think&nbsp;Douglas is talking a=
bout "winning" meaning getting into the language, but I may be wrong.</div>=
<div>Assuming we are still talking about labelled loops, does it need to be=
 implemented in clang or anything.</div><div>It's already implemented in ja=
va etc. so there doesn't appear to be a need to implement it in C++.</div><=
div>It just seems to be based on how you can find and interpret the&nbsp;me=
rits from the results&nbsp;of the use that already exists in Java etc.</div=
><div>And also your own opinions I guess.</div>&nbsp;</div><div>We had some=
 results but that failed to convince enough people if anyone to change side=
s.</div><div><br></div><div>Sorry if I've missed what you guys are talking =
about here.</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_11_830426530.1422304536987--
------=_Part_10_1342178774.1422304536987--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 22:36:57 +0200
Raw View
On 26 January 2015 at 22:28, Douglas Boffey <douglas.boffey@gmail.com> wrote:
> It demonstrates how many people want it!  Read what I said

I did read what you said. I asked what these "wins hands down"
statements are supposed
to mean. So, a handful of people on this forum want it, a handful
don't. In EWG, when
N3879, less than a dozen people wanted it, and a dozen people didn't. That's not
consensus, and that's not even a majority. If people want to keep insisting that
we should have it, they should figure out how to convince the
opponents to support
this idea and propose accordingly. I don't know how to do that, since
the problem
is lack of perceived usefulness and need compared to complicating the
language and its
implementation. That lack of perceived usefulness is not merely based
on gut instinct,
either - it's a result of experience on multiple codebases in various
environments throughout
many years, as far as I can see. It's also a result of using such
facilities in eg. Java, and
finding them more trouble than they are worth.

--

---
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 email 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-proposals/.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 22:49:54 +0200
Raw View
On 26 January 2015 at 22:35,  <gmisocpp@gmail.com> wrote:
> I think Douglas is talking about "winning" meaning getting into the
> language, but I may be wrong.
> Assuming we are still talking about labelled loops, does it need to be
> implemented in clang or anything.

The question is not about whether it can be specified/implemented in C++.
There's little doubt that it can. The question is why would we - and
the presence
of such a facility as an extension would at least hint towards a
sufficient amount
of users putting pressure on implementation vendors to get it.

> It just seems to be based on how you can find and interpret the merits from
> the results of the use that already exists in Java etc.
> And also your own opinions I guess.
> We had some results but that failed to convince enough people if anyone to
> change sides.

Yes, that certainly seems to be the state in which we remain despite all of this
discussion. And in such a case, status quo always wins, like it or not.

--

---
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 email 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-proposals/.

.


Author: Myriachan <myriachan@gmail.com>
Date: Mon, 26 Jan 2015 12:53:18 -0800 (PST)
Raw View
------=_Part_3701_196080728.1422305598537
Content-Type: multipart/alternative;
 boundary="----=_Part_3702_555386097.1422305598540"

------=_Part_3702_555386097.1422305598540
Content-Type: text/plain; charset=UTF-8

On Monday, January 26, 2015 at 12:36:58 PM UTC-8, Ville Voutilainen wrote:
>
> So, a handful of people on this forum want it, a handful
> don't. In EWG, when
> N3879, less than a dozen people wanted it, and a dozen people didn't.
> That's not
> consensus, and that's not even a majority.


Is that vote count regarding the entirety of N3879, or specifically
regarding labeled break / continue alone?

Melissa

--

---
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 email 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-proposals/.

------=_Part_3702_555386097.1422305598540
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, January 26, 2015 at 12:36:58 PM UTC-8, Ville Vo=
utilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">So, a handful =
of people on this forum want it, a handful
<br>don't. In EWG, when
<br>N3879, less than a dozen people wanted it, and a dozen people didn't. T=
hat's not
<br>consensus, and that's not even a majority.</blockquote><div><br>Is that=
 vote count regarding the entirety of N3879, or specifically regarding labe=
led <span style=3D"font-family: courier new,monospace;">break</span> / <spa=
n style=3D"font-family: courier new,monospace;">continue</span> alone?</div=
><br>Melissa<br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3702_555386097.1422305598540--
------=_Part_3701_196080728.1422305598537--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 26 Jan 2015 22:58:27 +0200
Raw View
On 26 January 2015 at 22:53, Myriachan <myriachan@gmail.com> wrote:
> On Monday, January 26, 2015 at 12:36:58 PM UTC-8, Ville Voutilainen wrote:
>>
>> So, a handful of people on this forum want it, a handful
>> don't. In EWG, when
>> N3879, less than a dozen people wanted it, and a dozen people didn't.
>> That's not
>> consensus, and that's not even a majority.
>
>
> Is that vote count regarding the entirety of N3879, or specifically
> regarding labeled break / continue alone?


Specifically for the labeled break/continue. For the proposal as a whole,
the vote was that two people wanted it and 23 didn't. :)

--

---
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 email 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-proposals/.

.


Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Tue, 27 Jan 2015 16:28:03 -0500
Raw View
--001a11c14db64c55f0050da8ef2b
Content-Type: text/plain; charset=UTF-8

This page <http://rosettacode.org/wiki/Loops/Nested> has samples in a large
variety of languages of breaking all the way out of a set of loops.  The
C++ is way, of course, is with lambdas.  This mockery is well-deserved.

#include<cstdlib>
#include<ctime>
#include<iostream>

using namespace std;
int main()
{
    int arr[10][10];
    srand(time(NULL));
    for(auto& row: arr)
        for(auto& col: row)
            col = rand() % 20 + 1;

    ([&](){
       for(auto& row : arr)
           for(auto& col: row)
           {
               cout << col << endl;
               if(col == 20)return;
           }
    })();
    return 0;
}


On Mon, Jan 26, 2015 at 3:58 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 26 January 2015 at 22:53, Myriachan <myriachan@gmail.com> wrote:
> > On Monday, January 26, 2015 at 12:36:58 PM UTC-8, Ville Voutilainen
> wrote:
> >>
> >> So, a handful of people on this forum want it, a handful
> >> don't. In EWG, when
> >> N3879, less than a dozen people wanted it, and a dozen people didn't.
> >> That's not
> >> consensus, and that's not even a majority.
> >
> >
> > Is that vote count regarding the entirety of N3879, or specifically
> > regarding labeled break / continue alone?
>
>
> Specifically for the labeled break/continue. For the proposal as a whole,
> the vote was that two people wanted it and 23 didn't. :)
>
> --
>
> ---
> 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
> email 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-proposals/.
>

--

---
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 email 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-proposals/.

--001a11c14db64c55f0050da8ef2b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">This page &lt;<a href=3D"http://rosettacode.org/wiki/Loops=
/Nested">http://rosettacode.org/wiki/Loops/Nested</a>&gt; has samples in a =
large variety of languages of breaking all the way out of a set of loops.=
=C2=A0 The C++ is way, of course, is with lambdas.=C2=A0 This mockery is we=
ll-deserved.<br><pre class=3D"" style=3D"font-family:monospace,Courier;padd=
ing:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);line-height:1.3e=
m;overflow:auto;font-size:12.8000001907349px;background-color:rgb(249,249,2=
49)"><span class=3D"" style=3D"font-weight:bold;color:rgb(102,102,102);font=
-style:italic">#include&lt;cstdlib&gt;</span><br><span class=3D"" style=3D"=
font-weight:bold;color:rgb(102,102,102);font-style:italic">#include&lt;ctim=
e&gt;</span><br><span class=3D"" style=3D"font-weight:bold;color:rgb(102,10=
2,102);font-style:italic">#include&lt;iostream&gt;</span><br>=C2=A0<br><spa=
n class=3D"" style=3D"font-weight:bold;color:rgb(0,0,204)">using</span> <sp=
an class=3D"" style=3D"font-weight:bold;color:rgb(0,0,204)">namespace</span=
> std<span class=3D"">;</span><br><span class=3D"" style=3D"font-weight:bol=
d;color:rgb(102,102,204)">int</span> main<span class=3D"" style=3D"font-wei=
ght:bold;color:rgb(0,153,0)">(</span><span class=3D"" style=3D"font-weight:=
bold;color:rgb(0,153,0)">)</span><br><span class=3D"" style=3D"font-weight:=
bold;color:rgb(0,153,0)">{</span><br>    <span class=3D"" style=3D"font-wei=
ght:bold;color:rgb(102,102,204)">int</span> arr<span class=3D"" style=3D"fo=
nt-weight:bold;color:rgb(0,153,0)">[</span><span class=3D"" style=3D"font-w=
eight:bold;color:rgb(0,153,153)">10</span><span class=3D"" style=3D"font-we=
ight:bold;color:rgb(0,153,0)">]</span><span class=3D"" style=3D"font-weight=
:bold;color:rgb(0,153,0)">[</span><span class=3D"" style=3D"font-weight:bol=
d;color:rgb(0,153,153)">10</span><span class=3D"" style=3D"font-weight:bold=
;color:rgb(0,153,0)">]</span><span class=3D"">;</span><br>    <span class=
=3D"" style=3D"font-weight:bold;color:rgb(51,51,204)">srand</span><span cla=
ss=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span class=
=3D"" style=3D"font-weight:bold;color:rgb(51,51,204)">time</span><span clas=
s=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span class=3D=
"" style=3D"font-weight:bold;color:rgb(0,0,204)">NULL</span><span class=3D"=
" style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><span class=3D"" st=
yle=3D"font-weight:bold;color:rgb(0,153,0)">)</span><span class=3D"">;</spa=
n><br>    <span class=3D"" style=3D"font-weight:bold;color:rgb(0,0,255)">fo=
r</span><span class=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">(</s=
pan><span class=3D"" style=3D"font-weight:bold;color:rgb(102,102,204)">auto=
</span><span class=3D"">&amp;</span> row<span class=3D"">:</span> arr<span =
class=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><br>      =
  <span class=3D"" style=3D"font-weight:bold;color:rgb(0,0,255)">for</span>=
<span class=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">(</span><spa=
n class=3D"" style=3D"font-weight:bold;color:rgb(102,102,204)">auto</span><=
span class=3D"">&amp;</span> col<span class=3D"">:</span> row<span class=3D=
"" style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><br>            co=
l <span class=3D"">=3D</span> <span class=3D"" style=3D"font-weight:bold;co=
lor:rgb(51,51,204)">rand</span><span class=3D"" style=3D"font-weight:bold;c=
olor:rgb(0,153,0)">(</span><span class=3D"" style=3D"font-weight:bold;color=
:rgb(0,153,0)">)</span> <span class=3D"">%</span> <span class=3D"" style=3D=
"font-weight:bold;color:rgb(0,153,153)">20</span> <span class=3D"">+</span>=
 <span class=3D"" style=3D"font-weight:bold;color:rgb(0,153,153)">1</span><=
span class=3D"">;</span><br>=C2=A0<br>    <span class=3D"" style=3D"font-we=
ight:bold;color:rgb(0,153,0)">(</span><span class=3D"" style=3D"font-weight=
:bold;color:rgb(0,153,0)">[</span><span class=3D"">&amp;</span><span class=
=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">]</span><span class=3D"=
" style=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span class=3D"" st=
yle=3D"font-weight:bold;color:rgb(0,153,0)">)</span><span class=3D"" style=
=3D"font-weight:bold;color:rgb(0,153,0)">{</span><br>       <span class=3D"=
" style=3D"font-weight:bold;color:rgb(0,0,255)">for</span><span class=3D"" =
style=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span class=3D"" styl=
e=3D"font-weight:bold;color:rgb(102,102,204)">auto</span><span class=3D"">&=
amp;</span> row <span class=3D"">:</span> arr<span class=3D"" style=3D"font=
-weight:bold;color:rgb(0,153,0)">)</span><br>           <span class=3D"" st=
yle=3D"font-weight:bold;color:rgb(0,0,255)">for</span><span class=3D"" styl=
e=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span class=3D"" style=3D=
"font-weight:bold;color:rgb(102,102,204)">auto</span><span class=3D"">&amp;=
</span> col<span class=3D"">:</span> row<span class=3D"" style=3D"font-weig=
ht:bold;color:rgb(0,153,0)">)</span><br>           <span class=3D"" style=
=3D"font-weight:bold;color:rgb(0,153,0)">{</span><br>               <span c=
lass=3D"" style=3D"font-weight:bold;color:rgb(51,51,204)">cout</span> <span=
 class=3D"">&lt;&lt;</span> col <span class=3D"">&lt;&lt;</span> endl<span =
class=3D"">;</span><br>               <span class=3D"" style=3D"font-weight=
:bold;color:rgb(0,0,255)">if</span><span class=3D"" style=3D"font-weight:bo=
ld;color:rgb(0,153,0)">(</span>col <span class=3D"">=3D=3D</span> <span cla=
ss=3D"" style=3D"font-weight:bold;color:rgb(0,153,153)">20</span><span clas=
s=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><span class=3D=
"" style=3D"font-weight:bold;color:rgb(0,0,255)">return</span><span class=
=3D"">;</span><br>           <span class=3D"" style=3D"font-weight:bold;col=
or:rgb(0,153,0)">}</span><br>    <span class=3D"" style=3D"font-weight:bold=
;color:rgb(0,153,0)">}</span><span class=3D"" style=3D"font-weight:bold;col=
or:rgb(0,153,0)">)</span><span class=3D"" style=3D"font-weight:bold;color:r=
gb(0,153,0)">(</span><span class=3D"" style=3D"font-weight:bold;color:rgb(0=
,153,0)">)</span><span class=3D"">;</span><br>    <span class=3D"" style=3D=
"font-weight:bold;color:rgb(0,0,255)">return</span> <span class=3D"" style=
=3D"font-weight:bold;color:rgb(0,153,153)">0</span><span class=3D"">;</span=
><br><span class=3D"" style=3D"font-weight:bold;color:rgb(0,153,0)">}</span=
></pre></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On M=
on, Jan 26, 2015 at 3:58 PM, Ville Voutilainen <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:ville.voutilainen@gmail.com" target=3D"_blank">ville.voutilaine=
n@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span c=
lass=3D"">On 26 January 2015 at 22:53, Myriachan &lt;<a href=3D"mailto:myri=
achan@gmail.com">myriachan@gmail.com</a>&gt; wrote:<br>
&gt; On Monday, January 26, 2015 at 12:36:58 PM UTC-8, Ville Voutilainen wr=
ote:<br>
&gt;&gt;<br>
&gt;&gt; So, a handful of people on this forum want it, a handful<br>
&gt;&gt; don&#39;t. In EWG, when<br>
&gt;&gt; N3879, less than a dozen people wanted it, and a dozen people didn=
&#39;t.<br>
&gt;&gt; That&#39;s not<br>
&gt;&gt; consensus, and that&#39;s not even a majority.<br>
&gt;<br>
&gt;<br>
&gt; Is that vote count regarding the entirety of N3879, or specifically<br=
>
&gt; regarding labeled break / continue alone?<br>
<br>
<br>
</span>Specifically for the labeled break/continue. For the proposal as a w=
hole,<br>
the vote was that two people wanted it and 23 didn&#39;t. :)<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c14db64c55f0050da8ef2b--

.


Author: gmisocpp@gmail.com
Date: Tue, 27 Jan 2015 15:25:43 -0800 (PST)
Raw View
------=_Part_4766_1138810157.1422401144047
Content-Type: multipart/alternative;
 boundary="----=_Part_4767_1608046635.1422401144047"

------=_Part_4767_1608046635.1422401144047
Content-Type: text/plain; charset=UTF-8



On Wednesday, January 28, 2015 at 10:28:25 AM UTC+13, Hyman Rosen wrote:
>
> This page <http://rosettacode.org/wiki/Loops/Nested
> <http://www.google.com/url?q=http%3A%2F%2Frosettacode.org%2Fwiki%2FLoops%2FNested&sa=D&sntz=1&usg=AFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA>>
> has samples in a large variety of languages of breaking all the way out of
> a set of loops.  The C++ is way, of course, is with lambdas.  This mockery
> is well-deserved.
>
> #include<cstdlib>
> #include<ctime>
> #include<iostream>
>
> using namespace std;
> int main()
> {
>     int arr[10][10];
>     srand(time(NULL));
>     for(auto& row: arr)
>         for(auto& col: row)
>             col = rand() % 20 + 1;
>
>     ([&](){
>        for(auto& row : arr)
>            for(auto& col: row)
>            {
>                cout << col << endl;
>                if(col == 20)return;
>            }
>     })();
>     return 0;
> }
>
>
>
>
lol

I would say they could have at least used chrono and the new random number
generator and avoided using endl for their c++11 project.
But I daren't wonder how long that version of the code would be and what
additional mockery would ensue!
Even then it'd still be out of date (groan). I wonder what the latest is on:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3847.pdf

They could at the very least put some spaces after #include, the C version
has them!

Please just vote labelled loops into the Standard. I can't bare to read
about it anymore. :)
Cue various rewrites of that loop for C++17...

--

---
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 email 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-proposals/.

------=_Part_4767_1608046635.1422401144047
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, January 28, 2015 at 10:28:25 AM UTC+=
13, Hyman Rosen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0p=
x 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); =
border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">This pa=
ge &lt;<a onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A=
%2F%2Frosettacode.org%2Fwiki%2FLoops%2FNested\46sa\75D\46sntz\0751\46usg\75=
AFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA';return true;" onclick=3D"this.href=3D'h=
ttp://www.google.com/url?q\75http%3A%2F%2Frosettacode.org%2Fwiki%2FLoops%2F=
Nested\46sa\75D\46sntz\0751\46usg\75AFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA';ret=
urn true;" href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Frosettacode.o=
rg%2Fwiki%2FLoops%2FNested&amp;sa=3DD&amp;sntz=3D1&amp;usg=3DAFQjCNHceJ3043=
9jRTdsUWKXOs8E2MuTWA" target=3D"_blank" rel=3D"nofollow">http://rosettacode=
..org/wiki/<wbr>Loops/Nested</a>&gt; has samples in a large variety of langu=
ages of breaking all the way out of a set of loops.&nbsp; The C++ is way, o=
f course, is with lambdas.&nbsp; This mockery is well-deserved.<br><pre sty=
le=3D"padding: 1em; border: 1px dashed rgb(47, 111, 171); border-image: non=
e; color: rgb(0, 0, 0); line-height: 1.3em; overflow: auto; font-family: mo=
nospace,Courier; font-size: 12.8px; background-color: rgb(249, 249, 249);">=
<span style=3D"color: rgb(102, 102, 102); font-style: italic; font-weight: =
bold;">#include&lt;cstdlib&gt;</span><br><span style=3D"color: rgb(102, 102=
, 102); font-style: italic; font-weight: bold;">#include&lt;ctime&gt;</span=
><br><span style=3D"color: rgb(102, 102, 102); font-style: italic; font-wei=
ght: bold;">#include&lt;iostream&gt;</span><br>&nbsp;<br><span style=3D"col=
or: rgb(0, 0, 204); font-weight: bold;">using</span> <span style=3D"color: =
rgb(0, 0, 204); font-weight: bold;">namespace</span> std<span>;</span><br><=
span style=3D"color: rgb(102, 102, 204); font-weight: bold;">int</span> mai=
n<span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</span><span st=
yle=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span><br><span style=
=3D"color: rgb(0, 153, 0); font-weight: bold;">{</span><br>    <span style=
=3D"color: rgb(102, 102, 204); font-weight: bold;">int</span> arr<span styl=
e=3D"color: rgb(0, 153, 0); font-weight: bold;">[</span><span style=3D"colo=
r: rgb(0, 153, 153); font-weight: bold;">10</span><span style=3D"color: rgb=
(0, 153, 0); font-weight: bold;">]</span><span style=3D"color: rgb(0, 153, =
0); font-weight: bold;">[</span><span style=3D"color: rgb(0, 153, 153); fon=
t-weight: bold;">10</span><span style=3D"color: rgb(0, 153, 0); font-weight=
: bold;">]</span><span>;</span><br>    <span style=3D"color: rgb(51, 51, 20=
4); font-weight: bold;">srand</span><span style=3D"color: rgb(0, 153, 0); f=
ont-weight: bold;">(</span><span style=3D"color: rgb(51, 51, 204); font-wei=
ght: bold;">time</span><span style=3D"color: rgb(0, 153, 0); font-weight: b=
old;">(</span><span style=3D"color: rgb(0, 0, 204); font-weight: bold;">NUL=
L</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span><=
span style=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span><span>;</s=
pan><br>    <span style=3D"color: rgb(0, 0, 255); font-weight: bold;">for</=
span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</span><spa=
n style=3D"color: rgb(102, 102, 204); font-weight: bold;">auto</span><span>=
&amp;</span> row<span>:</span> arr<span style=3D"color: rgb(0, 153, 0); fon=
t-weight: bold;">)</span><br>        <span style=3D"color: rgb(0, 0, 255); =
font-weight: bold;">for</span><span style=3D"color: rgb(0, 153, 0); font-we=
ight: bold;">(</span><span style=3D"color: rgb(102, 102, 204); font-weight:=
 bold;">auto</span><span>&amp;</span> col<span>:</span> row<span style=3D"c=
olor: rgb(0, 153, 0); font-weight: bold;">)</span><br>            col <span=
>=3D</span> <span style=3D"color: rgb(51, 51, 204); font-weight: bold;">ran=
d</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</span><=
span style=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span> <span>%</=
span> <span style=3D"color: rgb(0, 153, 153); font-weight: bold;">20</span>=
 <span>+</span> <span style=3D"color: rgb(0, 153, 153); font-weight: bold;"=
>1</span><span>;</span><br>&nbsp;<br>    <span style=3D"color: rgb(0, 153, =
0); font-weight: bold;">(</span><span style=3D"color: rgb(0, 153, 0); font-=
weight: bold;">[</span><span>&amp;</span><span style=3D"color: rgb(0, 153, =
0); font-weight: bold;">]</span><span style=3D"color: rgb(0, 153, 0); font-=
weight: bold;">(</span><span style=3D"color: rgb(0, 153, 0); font-weight: b=
old;">)</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">{</=
span><br>       <span style=3D"color: rgb(0, 0, 255); font-weight: bold;">f=
or</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</span>=
<span style=3D"color: rgb(102, 102, 204); font-weight: bold;">auto</span><s=
pan>&amp;</span> row <span>:</span> arr<span style=3D"color: rgb(0, 153, 0)=
; font-weight: bold;">)</span><br>           <span style=3D"color: rgb(0, 0=
, 255); font-weight: bold;">for</span><span style=3D"color: rgb(0, 153, 0);=
 font-weight: bold;">(</span><span style=3D"color: rgb(102, 102, 204); font=
-weight: bold;">auto</span><span>&amp;</span> col<span>:</span> row<span st=
yle=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span><br>           <s=
pan style=3D"color: rgb(0, 153, 0); font-weight: bold;">{</span><br>       =
        <span style=3D"color: rgb(51, 51, 204); font-weight: bold;">cout</s=
pan> <span>&lt;&lt;</span> col <span>&lt;&lt;</span> endl<span>;</span><br>=
               <span style=3D"color: rgb(0, 0, 255); font-weight: bold;">if=
</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</span>co=
l <span>=3D=3D</span> <span style=3D"color: rgb(0, 153, 153); font-weight: =
bold;">20</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">)=
</span><span style=3D"color: rgb(0, 0, 255); font-weight: bold;">return</sp=
an><span>;</span><br>           <span style=3D"color: rgb(0, 153, 0); font-=
weight: bold;">}</span><br>    <span style=3D"color: rgb(0, 153, 0); font-w=
eight: bold;">}</span><span style=3D"color: rgb(0, 153, 0); font-weight: bo=
ld;">)</span><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">(</s=
pan><span style=3D"color: rgb(0, 153, 0); font-weight: bold;">)</span><span=
>;</span><br>    <span style=3D"color: rgb(0, 0, 255); font-weight: bold;">=
return</span> <span style=3D"color: rgb(0, 153, 153); font-weight: bold;">0=
</span><span>;</span><br><span style=3D"color: rgb(0, 153, 0); font-weight:=
 bold;">}</span></pre></div><div><br><br></div></blockquote><div><br></div>=
<div>lol</div><div><br></div><div>I would say they could have at&nbsp;least=
&nbsp;used&nbsp;chrono and the new random number generator and avoided usin=
g endl for their c++11 project.</div><div>But&nbsp;I daren't wonder how&nbs=
p;long that version of the&nbsp;code would be and what additional mockery w=
ould ensue!</div><div>Even then it'd still be out of date (groan). I wonder=
 what the latest is on:<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/do=
cs/papers/2014/n3847.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/paper=
s/2014/n3847.pdf</a>&nbsp;</div><div><br></div><div><div>They could at the =
very least put&nbsp;some spaces after #include, the C version has them!</di=
v></div><div><br></div><div>Please just vote labelled loops into the Standa=
rd. I&nbsp;can't bare to read about it anymore. :)</div><div>Cue various re=
writes of that loop for C++17...</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_4767_1608046635.1422401144047--
------=_Part_4766_1138810157.1422401144047--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Tue, 27 Jan 2015 15:59:37 -0800
Raw View
--089e0122a24c28bc13050dab0c73
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 27, 2015 at 3:25 PM, <gmisocpp@gmail.com> wrote:

>
>
> On Wednesday, January 28, 2015 at 10:28:25 AM UTC+13, Hyman Rosen wrote:
>>
>> This page <http://rosettacode.org/wiki/Loops/Nested
>> <http://www.google.com/url?q=http%3A%2F%2Frosettacode.org%2Fwiki%2FLoops%2FNested&sa=D&sntz=1&usg=AFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA>>
>> has samples in a large variety of languages of breaking all the way out of
>> a set of loops.  The C++ is way, of course, is with lambdas.  This mockery
>> is well-deserved.
>>
>> #include<cstdlib>
>> #include<ctime>
>> #include<iostream>
>>
>> using namespace std;
>> int main()
>> {
>>     int arr[10][10];
>>     srand(time(NULL));
>>     for(auto& row: arr)
>>         for(auto& col: row)
>>             col = rand() % 20 + 1;
>>
>>     ([&](){
>>        for(auto& row : arr)
>>            for(auto& col: row)
>>            {
>>                cout << col << endl;
>>                if(col == 20)return;
>>            }
>>     })();
>>     return 0;
>> }
>>
>>
>>
>>
> lol
>
> I would say they could have at least used chrono and the new random number
> generator and avoided using endl for their c++11 project.
> But I daren't wonder how long that version of the code would be and what
> additional mockery would ensue!
> Even then it'd still be out of date (groan). I wonder what the latest is
> on:http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3847.pdf
>
> They could at the very least put some spaces after #include, the C version
> has them!
>
> Please just vote labelled loops into the Standard. I can't bare to read
> about it anymore. :)
> Cue various rewrites of that loop for C++17...
>

Dogma aside, what's wrong with using a goto, again?

--

---
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 email 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-proposals/.

--089e0122a24c28bc13050dab0c73
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Jan 27, 2015 at 3:25 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:gmiso=
cpp@gmail.com" target=3D"_blank">gmisocpp@gmail.com</a>&gt;</span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span class=3D""><br><br>=
On Wednesday, January 28, 2015 at 10:28:25 AM UTC+13, Hyman Rosen wrote:<bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-le=
ft:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left=
-style:solid"><div dir=3D"ltr">This page &lt;<a href=3D"http://www.google.c=
om/url?q=3Dhttp%3A%2F%2Frosettacode.org%2Fwiki%2FLoops%2FNested&amp;sa=3DD&=
amp;sntz=3D1&amp;usg=3DAFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA" rel=3D"nofollow"=
 target=3D"_blank">http://rosettacode.org/wiki/<u></u>Loops/Nested</a>&gt; =
has samples in a large variety of languages of breaking all the way out of =
a set of loops.=C2=A0 The C++ is way, of course, is with lambdas.=C2=A0 Thi=
s mockery is well-deserved.<br><pre style=3D"padding:1em;border:1px dashed =
rgb(47,111,171);color:rgb(0,0,0);line-height:1.3em;overflow:auto;font-famil=
y:monospace,Courier;font-size:12.8px;background-color:rgb(249,249,249)"><sp=
an style=3D"color:rgb(102,102,102);font-style:italic;font-weight:bold">#inc=
lude&lt;cstdlib&gt;</span><br><span style=3D"color:rgb(102,102,102);font-st=
yle:italic;font-weight:bold">#include&lt;ctime&gt;</span><br><span style=3D=
"color:rgb(102,102,102);font-style:italic;font-weight:bold">#include&lt;ios=
tream&gt;</span><br>=C2=A0<br><span style=3D"color:rgb(0,0,204);font-weight=
:bold">using</span> <span style=3D"color:rgb(0,0,204);font-weight:bold">nam=
espace</span> std<span>;</span><br><span style=3D"color:rgb(102,102,204);fo=
nt-weight:bold">int</span> main<span style=3D"color:rgb(0,153,0);font-weigh=
t:bold">(</span><span style=3D"color:rgb(0,153,0);font-weight:bold">)</span=
><br><span style=3D"color:rgb(0,153,0);font-weight:bold">{</span><br>    <s=
pan style=3D"color:rgb(102,102,204);font-weight:bold">int</span> arr<span s=
tyle=3D"color:rgb(0,153,0);font-weight:bold">[</span><span style=3D"color:r=
gb(0,153,153);font-weight:bold">10</span><span style=3D"color:rgb(0,153,0);=
font-weight:bold">]</span><span style=3D"color:rgb(0,153,0);font-weight:bol=
d">[</span><span style=3D"color:rgb(0,153,153);font-weight:bold">10</span><=
span style=3D"color:rgb(0,153,0);font-weight:bold">]</span><span>;</span><b=
r>    <span style=3D"color:rgb(51,51,204);font-weight:bold">srand</span><sp=
an style=3D"color:rgb(0,153,0);font-weight:bold">(</span><span style=3D"col=
or:rgb(51,51,204);font-weight:bold">time</span><span style=3D"color:rgb(0,1=
53,0);font-weight:bold">(</span><span style=3D"color:rgb(0,0,204);font-weig=
ht:bold">NULL</span><span style=3D"color:rgb(0,153,0);font-weight:bold">)</=
span><span style=3D"color:rgb(0,153,0);font-weight:bold">)</span><span>;</s=
pan><br>    <span style=3D"color:rgb(0,0,255);font-weight:bold">for</span><=
span style=3D"color:rgb(0,153,0);font-weight:bold">(</span><span style=3D"c=
olor:rgb(102,102,204);font-weight:bold">auto</span><span>&amp;</span> row<s=
pan>:</span> arr<span style=3D"color:rgb(0,153,0);font-weight:bold">)</span=
><br>        <span style=3D"color:rgb(0,0,255);font-weight:bold">for</span>=
<span style=3D"color:rgb(0,153,0);font-weight:bold">(</span><span style=3D"=
color:rgb(102,102,204);font-weight:bold">auto</span><span>&amp;</span> col<=
span>:</span> row<span style=3D"color:rgb(0,153,0);font-weight:bold">)</spa=
n><br>            col <span>=3D</span> <span style=3D"color:rgb(51,51,204);=
font-weight:bold">rand</span><span style=3D"color:rgb(0,153,0);font-weight:=
bold">(</span><span style=3D"color:rgb(0,153,0);font-weight:bold">)</span> =
<span>%</span> <span style=3D"color:rgb(0,153,153);font-weight:bold">20</sp=
an> <span>+</span> <span style=3D"color:rgb(0,153,153);font-weight:bold">1<=
/span><span>;</span><br>=C2=A0<br>    <span style=3D"color:rgb(0,153,0);fon=
t-weight:bold">(</span><span style=3D"color:rgb(0,153,0);font-weight:bold">=
[</span><span>&amp;</span><span style=3D"color:rgb(0,153,0);font-weight:bol=
d">]</span><span style=3D"color:rgb(0,153,0);font-weight:bold">(</span><spa=
n style=3D"color:rgb(0,153,0);font-weight:bold">)</span><span style=3D"colo=
r:rgb(0,153,0);font-weight:bold">{</span><br>       <span style=3D"color:rg=
b(0,0,255);font-weight:bold">for</span><span style=3D"color:rgb(0,153,0);fo=
nt-weight:bold">(</span><span style=3D"color:rgb(102,102,204);font-weight:b=
old">auto</span><span>&amp;</span> row <span>:</span> arr<span style=3D"col=
or:rgb(0,153,0);font-weight:bold">)</span><br>           <span style=3D"col=
or:rgb(0,0,255);font-weight:bold">for</span><span style=3D"color:rgb(0,153,=
0);font-weight:bold">(</span><span style=3D"color:rgb(102,102,204);font-wei=
ght:bold">auto</span><span>&amp;</span> col<span>:</span> row<span style=3D=
"color:rgb(0,153,0);font-weight:bold">)</span><br>           <span style=3D=
"color:rgb(0,153,0);font-weight:bold">{</span><br>               <span styl=
e=3D"color:rgb(51,51,204);font-weight:bold">cout</span> <span>&lt;&lt;</spa=
n> col <span>&lt;&lt;</span> endl<span>;</span><br>               <span sty=
le=3D"color:rgb(0,0,255);font-weight:bold">if</span><span style=3D"color:rg=
b(0,153,0);font-weight:bold">(</span>col <span>=3D=3D</span> <span style=3D=
"color:rgb(0,153,153);font-weight:bold">20</span><span style=3D"color:rgb(0=
,153,0);font-weight:bold">)</span><span style=3D"color:rgb(0,0,255);font-we=
ight:bold">return</span><span>;</span><br>           <span style=3D"color:r=
gb(0,153,0);font-weight:bold">}</span><br>    <span style=3D"color:rgb(0,15=
3,0);font-weight:bold">}</span><span style=3D"color:rgb(0,153,0);font-weigh=
t:bold">)</span><span style=3D"color:rgb(0,153,0);font-weight:bold">(</span=
><span style=3D"color:rgb(0,153,0);font-weight:bold">)</span><span>;</span>=
<br>    <span style=3D"color:rgb(0,0,255);font-weight:bold">return</span> <=
span style=3D"color:rgb(0,153,153);font-weight:bold">0</span><span>;</span>=
<br><span style=3D"color:rgb(0,153,0);font-weight:bold">}</span></pre></div=
><div><br><br></div></blockquote><div><br></div></span><div>lol</div><div><=
br></div><div>I would say they could have at=C2=A0least=C2=A0used=C2=A0chro=
no and the new random number generator and avoided using endl for their c++=
11 project.</div><div>But=C2=A0I daren&#39;t wonder how=C2=A0long that vers=
ion of the=C2=A0code would be and what additional mockery would ensue!</div=
><div>Even then it&#39;d still be out of date (groan). I wonder what the la=
test is on:<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/20=
14/n3847.pdf" target=3D"_blank">http://www.open-std.org/jtc1/sc22/wg21/docs=
/papers/2014/n3847.pdf</a>=C2=A0</div><div><br></div><div><div>They could a=
t the very least put=C2=A0some spaces after #include, the C version has the=
m!</div></div><div><br></div><div>Please just vote labelled loops into the =
Standard. I=C2=A0can&#39;t bare to read about it anymore. :)</div><div>Cue =
various rewrites of that loop for C++17...</div></div></blockquote><div><br=
></div><div>Dogma aside, what&#39;s wrong with using a goto, again?</div></=
div></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e0122a24c28bc13050dab0c73--

.


Author: mobiphil <mobi@mobiphil.com>
Date: Tue, 27 Jan 2015 16:08:41 -0800 (PST)
Raw View
------=_Part_271_723986397.1422403721305
Content-Type: multipart/alternative;
 boundary="----=_Part_272_397030477.1422403721305"

------=_Part_272_397030477.1422403721305
Content-Type: text/plain; charset=UTF-8


>
> How can
>
> L1: for (auto i:foo)
>   L2: for (auto j:bar) {
>     for (auto k:baz)
>       break L2;
>     break L1;
>   }
>

I reply to this one as I like this proposal. The one with return from
lambda is also lovely!
I use also very often such nested loops, and for me it seems rather natural
to have conditions that would force to jump out, not one level, and not
necessarily all the levels.

Ideally one should set-up a system where one would sponsor with an amount X
to get feature Y. Would be though probably difficult to find out how many
C++ developers would participate in such a game once they fairly accept
that the system is reliable. Such information would be probably important
to design costs and adjust personal thresholds. I would be ready to pay
1euro if I know that the amount would be there if everybody pays 1 our, but
I would equally pay 10 euros if that is the threshold for success. The
return on investment would be more than that over the years.

I met several C++ developers through my career, maybe 1 out of 100 dared to
express their needs on a place like this for several reasons, among others
some complexes like their C++ knowledge would be far below the average of
the group. The point I try to make is that often the industry is directed
by some "leaders", who, as the history proved did not necessarily take the
best decisions. Lot of story was written about evolution of meta
programming and it is obviously great but I still see lot of industry where
such a small thing would bring much more immediate added value (like auto
variables) rather than complex metaprogramming features.



--

---
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 email 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-proposals/.

------=_Part_272_397030477.1422403721305
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">How can
<br>
<br>L1: for (auto i:foo)
<br>&nbsp; L2: for (auto j:bar) {
<br>&nbsp; &nbsp; for (auto k:baz)
<br>&nbsp; &nbsp; &nbsp; break L2;
<br>&nbsp; &nbsp; break L1;
<br>&nbsp; }
<br></blockquote><div><br></div><div>I reply to this one as I like this pro=
posal. The one with return from lambda is also lovely!</div><div>I use also=
 very often such nested loops, and for me it seems rather natural to have c=
onditions that would force to jump out, not one level, and not necessarily =
all the levels.&nbsp;</div><div><br></div><div>Ideally one should set-up a =
system where one would sponsor with an amount X to get feature Y. Would be =
though probably difficult to find out how many C++ developers would partici=
pate in such a game once they fairly accept that the system is reliable. Su=
ch information would be probably important to design costs and adjust perso=
nal thresholds. I would be ready to pay 1euro if I know that the amount wou=
ld be there if everybody pays 1 our, but I would equally pay 10 euros if th=
at is the threshold for success. The return on investment would be more tha=
n that over the years.</div><div><br></div><div>I met several C++ developer=
s through my career, maybe 1 out of 100 dared to express their needs on a p=
lace like this for several reasons, among others some complexes like their =
C++ knowledge would be far below the average of the group. The point I try =
to make is that often the industry is directed by some "leaders", who, as t=
he history proved did not necessarily take the best decisions. Lot of story=
 was written about evolution of meta programming and it is obviously great =
but I still see lot of industry where such a small thing would bring much m=
ore immediate added value (like auto variables) rather than complex metapro=
gramming features.&nbsp;</div><div><br></div><div><br></div><div><br></div>=
</div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_272_397030477.1422403721305--
------=_Part_271_723986397.1422403721305--

.


Author: mobiphil <mobi@mobiphil.com>
Date: Tue, 27 Jan 2015 16:11:00 -0800 (PST)
Raw View
------=_Part_4904_1041417153.1422403860997
Content-Type: multipart/alternative;
 boundary="----=_Part_4905_1106367421.1422403860997"

------=_Part_4905_1106367421.1422403860997
Content-Type: text/plain; charset=UTF-8


>
> Dogma aside, what's wrong with using a goto, again?
>

Most of the time you have to fix spaghetti code. You know where the loops
begin, thus you would know that moment that you want to break that one.
Adding a label means finding the spaghetti end, which means hell lot of
useless brain power ;)

--

---
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 email 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-proposals/.

------=_Part_4905_1106367421.1422403860997
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div class=3D"gmail_quote"><div>Dogma aside, what's wrong with using a =
goto, again?<br></div></div></div></blockquote><div><br></div><div>Most of =
the time you have to fix spaghetti code. You know where the loops begin, th=
us you would know that moment that you want to break that one. Adding a lab=
el means finding the spaghetti end, which means hell lot of useless brain p=
ower ;)</div><div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_4905_1106367421.1422403860997--
------=_Part_4904_1041417153.1422403860997--

.


Author: gmisocpp@gmail.com
Date: Tue, 27 Jan 2015 16:35:24 -0800 (PST)
Raw View
------=_Part_4545_990412629.1422405324100
Content-Type: multipart/alternative;
 boundary="----=_Part_4546_719307706.1422405324101"

------=_Part_4546_719307706.1422405324101
Content-Type: text/plain; charset=UTF-8




>> Please just vote labelled loops into the Standard. I can't bare to read
>> about it anymore. :)
>> Cue various rewrites of that loop for C++17...
>>
>
> Dogma aside, what's wrong with using a goto, again?
>

You mean apart apart from having to keep reading proposals for people
asking to use labelled loops instead!?
Absolutely nothing! See my comments earlier to the one you replied to. :)

--

---
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 email 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-proposals/.

------=_Part_4546_719307706.1422405324101
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br><blockquote class=3D"gmail_quote" style=3D"margin:=
 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204=
); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><div=
><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"marg=
in: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, =
204); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><=
div><br></div><div>Please just vote labelled loops into the Standard. I&nbs=
p;can't bare to read about it anymore. :)</div><div>Cue various rewrites of=
 that loop for C++17...</div></div></blockquote><div><br></div><div>Dogma a=
side, what's wrong with using a goto, again?</div></div></div></div></block=
quote><div><br></div><div><div>You mean apart apart from having to keep rea=
ding proposals for people asking&nbsp;to use labelled loops instead!?</div>=
</div><div>Absolutely nothing! See my&nbsp;comments earlier to the one you =
replied to. :)</div><div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_4546_719307706.1422405324101--
------=_Part_4545_990412629.1422405324100--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 27 Jan 2015 22:02:41 -0500
Raw View
--089e0160bbf8ce1ba1050dad9a68
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 27, 2015 at 6:25 PM, <gmisocpp@gmail.com> wrote:

>
>
> Please just vote labelled loops into the Standard. I can't bare to read
> about it anymore. :)
>
>
 Yes, my thinking as well.  I don't want to give anyone any ideas, but the
only reason I'd vote for this is so it stops getting proposed.

The same thing with switch statements.  Always proposals for improvements.
But there patience might pay off - Bjarne showed a nice pattern matching
proposal that replaces/fixes switch statements.  So if we wait on these
things long enough, instead of incremental fixes, we might get real
improvements.

P.S. watch http://channel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning
where Sean Parent recommends - in fact this is his number #1 coding
recommendation - "no raw loops".


Tony

--

---
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 email 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-proposals/.

--089e0160bbf8ce1ba1050dad9a68
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Tue, Jan 27, 2015 at 6:25 PM,  <span dir=3D"ltr">&lt;<a href=3D"mail=
to:gmisocpp@gmail.com" target=3D"_blank">gmisocpp@gmail.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=3D"h=
5"><span class=3D""><br></span><div><br></div><div>Please just vote labelle=
d loops into the Standard. I=C2=A0can&#39;t bare to read about it anymore. =
:)</div><br></div></blockquote><div><br></div><div>=C2=A0Yes, my thinking a=
s well.=C2=A0 I don&#39;t want to give anyone any ideas, but the only reaso=
n I&#39;d vote for this is so it stops getting proposed.<br><br></div><div>=
The same thing with switch statements.=C2=A0 Always proposals for improveme=
nts.<br></div><div>But there patience might pay off - Bjarne showed a nice =
pattern matching proposal that replaces/fixes switch statements.=C2=A0 So i=
f we wait on these things long enough, instead of incremental fixes, we mig=
ht get real improvements.<br><br></div><div>P.S. watch <a href=3D"http://ch=
annel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning">http://channel9.msdn=
..com/Events/GoingNative/2013/Cpp-Seasoning</a> where Sean Parent recommends=
 - in fact this is his number #1 coding recommendation - &quot;no raw loops=
&quot;.<br><br><br></div><div>Tony<br></div></div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e0160bbf8ce1ba1050dad9a68--

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 27 Jan 2015 21:10:42 -0600
Raw View
--001a1139b9d2ec16d7050dadb9ea
Content-Type: text/plain; charset=UTF-8

On 27 January 2015 at 21:02, Tony V E <tvaneerd@gmail.com> wrote:

> I don't want to give anyone any ideas, but the only reason I'd vote for
> this is so it stops getting proposed.
>

Well, if that all it takes to get your vote...

And as was asked in this very group three months ago:

On 22 October 2014 at 10:32, Olaf van der Spek <olafvdspek@gmail.com> wrote:

> Why do you have bring up voting so often?
>

(Apparently people around here would rather put in lots of work and then be
surprised when it doesn't pass)
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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 email 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-proposals/.

--001a1139b9d2ec16d7050dadb9ea
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 27 January 2015 at 21:02, Tony V E <span dir=3D"ltr">&lt;<a href=3D"mail=
to:tvaneerd@gmail.com" target=3D"_blank">tvaneerd@gmail.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-sty=
le:solid;padding-left:1ex"><div>I don&#39;t want to give anyone any ideas, =
but the only reason I&#39;d vote for this is so it stops getting proposed.<=
br></div></blockquote></div><br>Well, if that all it takes to get your vote=
....</div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">An=
d as was asked in this very group three months ago:</div><div class=3D"gmai=
l_extra"><br></div><div class=3D"gmail_extra">On 22 October 2014 at 10:32, =
Olaf van der Spek=C2=A0<span dir=3D"ltr">&lt;<a href=3D"mailto:olafvdspek@g=
mail.com" target=3D"_blank">olafvdspek@gmail.com</a>&gt;</span>=C2=A0wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor=
der-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:sol=
id;padding-left:1ex"><div dir=3D"ltr">Why do you have bring up voting so of=
ten?<br></div></blockquote><div><br></div><div>(Apparently people around he=
re would rather put in lots of work and then be surprised when it doesn&#39=
;t pass)=C2=A0</div><div>--=C2=A0<br></div><div class=3D"gmail_signature">=
=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@=
eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=A0 (8=
47) 691-1404</div>
</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a1139b9d2ec16d7050dadb9ea--

.


Author: gmisocpp@gmail.com
Date: Tue, 27 Jan 2015 19:17:13 -0800 (PST)
Raw View
------=_Part_1385_546535390.1422415033412
Content-Type: multipart/alternative;
 boundary="----=_Part_1386_832741511.1422415033412"

------=_Part_1386_832741511.1422415033412
Content-Type: text/plain; charset=UTF-8



On Wednesday, January 28, 2015 at 4:02:44 PM UTC+13, Tony V E wrote:
>
>
>
> On Tue, Jan 27, 2015 at 6:25 PM, <gmis...@gmail.com <javascript:>> wrote:
>
>>
>>
>> Please just vote labelled loops into the Standard. I can't bare to read
>> about it anymore. :)
>>
>>
>  Yes, my thinking as well.  I don't want to give anyone any ideas, but the
> only reason I'd vote for this is so it stops getting proposed.
>
> The same thing with switch statements.  Always proposals for improvements.
> But there patience might pay off - Bjarne showed a nice pattern matching
> proposal that replaces/fixes switch statements.  So if we wait on these
> things long enough, instead of incremental fixes, we might get real
> improvements.
>

If you mean this:
http://www.stroustrup.com/OpenPatternMatching.pdf
Yes I would love to know if the authors think this might be ready to
propose for C++17!


> P.S. watch http://channel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning
> where Sean Parent recommends - in fact this is his number #1 coding
> recommendation - "no raw loops".
>
>
I watched the seasoning talk. I think it's one of the best talks I've ever
seen. Thanks for reminding me to watch it again.



--

---
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 email 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-proposals/.

------=_Part_1386_832741511.1422415033412
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, January 28, 2015 at 4:02:44 PM UTC+1=
3, Tony V E wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0p=
x 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bord=
er-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><br><div><b=
r><div class=3D"gmail_quote">On Tue, Jan 27, 2015 at 6:25 PM,  <span dir=3D=
"ltr">&lt;<a onmousedown=3D"this.href=3D'javascript:';return true;" onclick=
=3D"this.href=3D'javascript:';return true;" href=3D"javascript:" target=3D"=
_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"gojblSjibrMJ">gmis...@gma=
il.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 2=
04, 204); border-left-width: 1px; border-left-style: solid;"><div><span><br=
></span><div><br></div><div>Please just vote labelled loops into the Standa=
rd. I&nbsp;can't bare to read about it anymore. :)</div><br></div></blockqu=
ote><div><br></div><div>&nbsp;Yes, my thinking as well.&nbsp; I don't want =
to give anyone any ideas, but the only reason I'd vote for this is so it st=
ops getting proposed.<br><br></div><div>The same thing with switch statemen=
ts.&nbsp; Always proposals for improvements.<br></div><div>But there patien=
ce might pay off - Bjarne showed a nice pattern matching proposal that repl=
aces/fixes switch statements.&nbsp; So if we wait on these things long enou=
gh, instead of incremental fixes, we might get real improvements.<br></div>=
</div></div></div></blockquote><div><br></div><div>If you mean this:</div><=
div><a href=3D"http://www.stroustrup.com/OpenPatternMatching.pdf">http://ww=
w.stroustrup.com/OpenPatternMatching.pdf</a></div><div>Yes&nbsp;I would lov=
e to know&nbsp;if the authors think this might be ready to propose for C++1=
7!</div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0=
px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204);=
 border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><div><=
div class=3D"gmail_quote"><div><br></div><div>P.S. watch <a onmousedown=3D"=
this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fchannel9.msdn.com%2=
FEvents%2FGoingNative%2F2013%2FCpp-Seasoning\46sa\75D\46sntz\0751\46usg\75A=
FQjCNEHPNni6h8r6ptj-MtqZRt9KywszA';return true;" onclick=3D"this.href=3D'ht=
tp://www.google.com/url?q\75http%3A%2F%2Fchannel9.msdn.com%2FEvents%2FGoing=
Native%2F2013%2FCpp-Seasoning\46sa\75D\46sntz\0751\46usg\75AFQjCNEHPNni6h8r=
6ptj-MtqZRt9KywszA';return true;" href=3D"http://channel9.msdn.com/Events/G=
oingNative/2013/Cpp-Seasoning" target=3D"_blank" rel=3D"nofollow">http://ch=
annel9.msdn.com/<wbr>Events/GoingNative/2013/Cpp-<wbr>Seasoning</a> where S=
ean Parent recommends - in fact this is his number #1 coding recommendation=
 - "no raw loops".<br></div><div><br></div></div></div></div></blockquote><=
div>&nbsp;</div><div>I&nbsp;watched&nbsp;the&nbsp;seasoning&nbsp;talk.&nbsp=
;I think it's one of the best talks I've ever seen. Thanks for reminding me=
 to watch it again.</div><div><br></div><div>&nbsp;</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1386_832741511.1422415033412--
------=_Part_1385_546535390.1422415033412--

.


Author: TONGARI J <tongari95@gmail.com>
Date: Tue, 27 Jan 2015 21:55:19 -0800 (PST)
Raw View
------=_Part_4851_749453187.1422424519298
Content-Type: multipart/alternative;
 boundary="----=_Part_4852_1068124254.1422424519298"

------=_Part_4852_1068124254.1422424519298
Content-Type: text/plain; charset=UTF-8

On Wednesday, January 28, 2015 at 5:28:25 AM UTC+8, Hyman Rosen wrote:
>
> This page <http://rosettacode.org/wiki/Loops/Nested> has samples in a
> large variety of languages of breaking all the way out of a set of loops.
> The C++ is way, of course, is with lambdas.  This mockery is well-deserved.
>
> #include<cstdlib>
> #include<ctime>
> #include<iostream>
>
> using namespace std;
> int main()
> {
>     int arr[10][10];
>     srand(time(NULL));
>     for(auto& row: arr)
>         for(auto& col: row)
>             col = rand() % 20 + 1;
>
>     ([&](){
>        for(auto& row : arr)
>            for(auto& col: row)
>            {
>                cout << col << endl;
>                if(col == 20)return;
>            }
>     })();
>     return 0;
> }
>
>
Or we can use poor-man's labeled-break:

#include<cstdlib>
#include<ctime>
#include<iostream>

#define $(name) \
if (constexpr bool $##name = false){break$(name); break$##name:;} else

#define break$(name) \
do {goto break$##name;} while ($##name)

using namespace std;
int main()
{
    int arr[10][10];
    srand(time(NULL));
    for(auto& row: arr)
        for(auto& col: row)
            col = rand() % 20 + 1;

    $(outer)
    for(auto& row : arr)
        for(auto& col: row)
        {
            cout << col << endl;
            if(col == 20)
                break$(outer);
        }

    return 0;
}

I'd like to have labeled-break as a language feature.

Though there's nothing wrong with goto, but the point of labeled-break is
not how powerful it is, instead, it's how restrictive it is.
Consider template and concept, why we need concept? it's because we like to
be constrained, the same applies to labeled-break here, it ensures that we
can only break the surrounding scopes, not goto arbitrary places.

--

---
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 email 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-proposals/.

------=_Part_4852_1068124254.1422424519298
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, January 28, 2015 at 5:28:25 AM UTC+8, Hyman =
Rosen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">T=
his page &lt;<a href=3D"http://rosettacode.org/wiki/Loops/Nested" target=3D=
"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'http://www.google.com=
/url?q\75http%3A%2F%2Frosettacode.org%2Fwiki%2FLoops%2FNested\46sa\75D\46sn=
tz\0751\46usg\75AFQjCNHceJ30439jRTdsUWKXOs8E2MuTWA';return true;" onclick=
=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Frosettacode.org=
%2Fwiki%2FLoops%2FNested\46sa\75D\46sntz\0751\46usg\75AFQjCNHceJ30439jRTdsU=
WKXOs8E2MuTWA';return true;">http://rosettacode.org/wiki/<wbr>Loops/Nested<=
/a>&gt; has samples in a large variety of languages of breaking all the way=
 out of a set of loops.&nbsp; The C++ is way, of course, is with lambdas.&n=
bsp; This mockery is well-deserved.<br><pre style=3D"font-family:monospace,=
Courier;padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);line=
-height:1.3em;overflow:auto;font-size:12.8000001907349px;background-color:r=
gb(249,249,249)"><span style=3D"font-weight:bold;color:rgb(102,102,102);fon=
t-style:italic">#include&lt;cstdlib&gt;</span><br><span style=3D"font-weigh=
t:bold;color:rgb(102,102,102);font-style:italic">#include&lt;ctime&gt;</spa=
n><br><span style=3D"font-weight:bold;color:rgb(102,102,102);font-style:ita=
lic">#include&lt;iostream&gt;</span><br>&nbsp;<br><span style=3D"font-weigh=
t:bold;color:rgb(0,0,204)">using</span> <span style=3D"font-weight:bold;col=
or:rgb(0,0,204)">namespace</span> std<span>;</span><br><span style=3D"font-=
weight:bold;color:rgb(102,102,204)">int</span> main<span style=3D"font-weig=
ht:bold;color:rgb(0,153,0)">(</span><span style=3D"font-weight:bold;color:r=
gb(0,153,0)">)</span><br><span style=3D"font-weight:bold;color:rgb(0,153,0)=
">{</span><br>    <span style=3D"font-weight:bold;color:rgb(102,102,204)">i=
nt</span> arr<span style=3D"font-weight:bold;color:rgb(0,153,0)">[</span><s=
pan style=3D"font-weight:bold;color:rgb(0,153,153)">10</span><span style=3D=
"font-weight:bold;color:rgb(0,153,0)">]</span><span style=3D"font-weight:bo=
ld;color:rgb(0,153,0)">[</span><span style=3D"font-weight:bold;color:rgb(0,=
153,153)">10</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">]</s=
pan><span>;</span><br>    <span style=3D"font-weight:bold;color:rgb(51,51,2=
04)">srand</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">(</spa=
n><span style=3D"font-weight:bold;color:rgb(51,51,204)">time</span><span st=
yle=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span style=3D"font-wei=
ght:bold;color:rgb(0,0,204)">NULL</span><span style=3D"font-weight:bold;col=
or:rgb(0,153,0)">)</span><span style=3D"font-weight:bold;color:rgb(0,153,0)=
">)</span><span>;</span><br>    <span style=3D"font-weight:bold;color:rgb(0=
,0,255)">for</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">(</s=
pan><span style=3D"font-weight:bold;color:rgb(102,102,204)">auto</span><spa=
n>&amp;</span> row<span>:</span> arr<span style=3D"font-weight:bold;color:r=
gb(0,153,0)">)</span><br>        <span style=3D"font-weight:bold;color:rgb(=
0,0,255)">for</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">(</=
span><span style=3D"font-weight:bold;color:rgb(102,102,204)">auto</span><sp=
an>&amp;</span> col<span>:</span> row<span style=3D"font-weight:bold;color:=
rgb(0,153,0)">)</span><br>            col <span>=3D</span> <span style=3D"f=
ont-weight:bold;color:rgb(51,51,204)">rand</span><span style=3D"font-weight=
:bold;color:rgb(0,153,0)">(</span><span style=3D"font-weight:bold;color:rgb=
(0,153,0)">)</span> <span>%</span> <span style=3D"font-weight:bold;color:rg=
b(0,153,153)">20</span> <span>+</span> <span style=3D"font-weight:bold;colo=
r:rgb(0,153,153)">1</span><span>;</span><br>&nbsp;<br>    <span style=3D"fo=
nt-weight:bold;color:rgb(0,153,0)">(</span><span style=3D"font-weight:bold;=
color:rgb(0,153,0)">[</span><span>&amp;</span><span style=3D"font-weight:bo=
ld;color:rgb(0,153,0)">]</span><span style=3D"font-weight:bold;color:rgb(0,=
153,0)">(</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">)</span=
><span style=3D"font-weight:bold;color:rgb(0,153,0)">{</span><br>       <sp=
an style=3D"font-weight:bold;color:rgb(0,0,255)">for</span><span style=3D"f=
ont-weight:bold;color:rgb(0,153,0)">(</span><span style=3D"font-weight:bold=
;color:rgb(102,102,204)">auto</span><span>&amp;</span> row <span>:</span> a=
rr<span style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><br>         =
  <span style=3D"font-weight:bold;color:rgb(0,0,255)">for</span><span style=
=3D"font-weight:bold;color:rgb(0,153,0)">(</span><span style=3D"font-weight=
:bold;color:rgb(102,102,204)">auto</span><span>&amp;</span> col<span>:</spa=
n> row<span style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><br>     =
      <span style=3D"font-weight:bold;color:rgb(0,153,0)">{</span><br>     =
          <span style=3D"font-weight:bold;color:rgb(51,51,204)">cout</span>=
 <span>&lt;&lt;</span> col <span>&lt;&lt;</span> endl<span>;</span><br>    =
           <span style=3D"font-weight:bold;color:rgb(0,0,255)">if</span><sp=
an style=3D"font-weight:bold;color:rgb(0,153,0)">(</span>col <span>=3D=3D</=
span> <span style=3D"font-weight:bold;color:rgb(0,153,153)">20</span><span =
style=3D"font-weight:bold;color:rgb(0,153,0)">)</span><span style=3D"font-w=
eight:bold;color:rgb(0,0,255)">return</span><span>;</span><br>           <s=
pan style=3D"font-weight:bold;color:rgb(0,153,0)">}</span><br>    <span sty=
le=3D"font-weight:bold;color:rgb(0,153,0)">}</span><span style=3D"font-weig=
ht:bold;color:rgb(0,153,0)">)</span><span style=3D"font-weight:bold;color:r=
gb(0,153,0)">(</span><span style=3D"font-weight:bold;color:rgb(0,153,0)">)<=
/span><span>;</span><br>    <span style=3D"font-weight:bold;color:rgb(0,0,2=
55)">return</span> <span style=3D"font-weight:bold;color:rgb(0,153,153)">0<=
/span><span>;</span><br><span style=3D"font-weight:bold;color:rgb(0,153,0)"=
>}</span></pre></div></blockquote><div><br></div><div>Or we can use poor-ma=
n's labeled-break:</div><br><div class=3D"prettyprint" style=3D"border: 1px=
 solid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(250=
, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><sp=
an style=3D"color: #800;" class=3D"styled-by-prettify">#include</span><span=
 style=3D"color: #080;" class=3D"styled-by-prettify">&lt;cstdlib&gt;</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span =
style=3D"color: #800;" class=3D"styled-by-prettify">#include</span><span st=
yle=3D"color: #080;" class=3D"styled-by-prettify">&lt;ctime&gt;</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #800;" class=3D"styled-by-prettify">#include</span><span style=
=3D"color: #080;" class=3D"styled-by-prettify">&lt;iostream&gt;</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><span s=
tyle=3D"color: #800;" class=3D"styled-by-prettify">#define</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> $</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify">name</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r></span><span style=3D"color: #008;" class=3D"styled-by-prettify">if</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">constexpr</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">bool</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> $</span><span style=3D"color: #800;" class=3D"sty=
led-by-prettify">##name =3D false){break$(name); break$##name:;} else</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><=
span style=3D"color: #800;" class=3D"styled-by-prettify">#define</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">break</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">$</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">name</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">do</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">goto</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">break</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">$</span><span style=3D"color: #800;" class=3D"styled-by-prett=
ify">##name;} while ($##name)</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br><br></span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">namespace</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> main</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>&nbsp; &nbsp; </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> arr</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">[</span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">10</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>][</span><span style=3D"color: #066;" class=3D"styled-by-prettify">10</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">];</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; srand=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">time</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">NULL</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">));</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br>&nbsp; &nbsp; </span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">for</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">auto</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> row</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> arr</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nb=
sp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>for</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> col</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> row</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; col </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> rand</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">%</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-b=
y-prettify">20</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">+</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #066;" class=3D"styled-by-prettify">1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br><br>&nbsp; &nbsp; $</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">outer</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>&nbsp; &nbsp; </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">for</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">auto</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> row </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> arr</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp;=
 &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-prettify">fo=
r</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> col</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> row</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 cout </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;=
&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> col <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> endl</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">if</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">col </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D=3D</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #066;" class=3D"styled-by-prettify">20</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
; &nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">break</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>$</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">outer</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nb=
sp; </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>&nbsp; =
&nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-prettify">ret=
urn</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">}</span></div></code></div><div><br></di=
v>I'd like to have labeled-break as a language feature.<div><br></div><div>=
Though there's nothing wrong with goto, but the point of labeled-break is n=
ot how powerful it is, instead, it's how restrictive it is.</div><div>Consi=
der template and concept, why we need concept? it's because we like to be c=
onstrained, the same applies to labeled-break here, it ensures that we can =
only break the surrounding scopes, not goto arbitrary places.</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_4852_1068124254.1422424519298--
------=_Part_4851_749453187.1422424519298--

.


Author: gmisocpp@gmail.com
Date: Tue, 27 Jan 2015 23:13:43 -0800 (PST)
Raw View
------=_Part_4870_1334099217.1422429223994
Content-Type: multipart/alternative;
 boundary="----=_Part_4871_328781792.1422429223994"

------=_Part_4871_328781792.1422429223994
Content-Type: text/plain; charset=UTF-8



On Wednesday, January 28, 2015 at 6:55:19 PM UTC+13, TONGARI J wrote:
>
> Though there's nothing wrong with goto, but the point of labeled-break is
> not how powerful it is, instead, it's how restrictive it is.
> Consider template and concept, why we need concept? it's because we like
> to be constrained, the same applies to labeled-break here, it ensures that
> we can only break the surrounding scopes, not goto arbitrary places.
>

You can't goto arbitrary places. The label has to be unique so you are
going to exactly one place.
labelled loops could be considered more arbitrary depending on how the
scoping is specified. Everyone will likely label their loops all the same
like inner or outer too.
But my argument isn't strongly against labelled loops because they won't
work, they will, it's because I don't believe we need them as much as
anything else the Committee might choose to work on.

--

---
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 email 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-proposals/.

------=_Part_4871_328781792.1422429223994
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, January 28, 2015 at 6:55:19 PM UTC+1=
3, TONGARI J wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0=
px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bor=
der-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><div>Thoug=
h there's nothing wrong with goto, but the point of labeled-break is not ho=
w powerful it is, instead, it's how restrictive it is.</div><div>Consider t=
emplate and concept, why we need concept? it's because we like to be constr=
ained, the same applies to labeled-break here, it ensures that we can only =
break the surrounding scopes, not goto arbitrary places.</div></div></block=
quote><div><br></div><div>You can't goto arbitrary places. The label has to=
 be unique so you are going to exactly one place.</div><div>labelled loops&=
nbsp;could be considered more arbitrary&nbsp;depending on how the scoping i=
s specified.&nbsp;Everyone will likely label their loops all the same like =
inner or outer too.</div><div>But my argument isn't strongly against labell=
ed loops because they won't work, they will, it's because I don't believe w=
e need them as much as anything else the Committee might choose to work on.=
</div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_4871_328781792.1422429223994--
------=_Part_4870_1334099217.1422429223994--

.


Author: David Krauss <potswa@gmail.com>
Date: Wed, 28 Jan 2015 21:14:38 +0800
Raw View
--Apple-Mail=_2493D952-2AD5-4440-9CEE-10BCABFE504A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9301=E2=80=9328, at 1:55 PM, TONGARI J <tongari95@gmail.com=
> wrote:
>=20
> Or we can use poor-man's labeled-break:

The $ character is not legal C++, and there are several obfuscation tactics=
 in play there. Hopefully this is a little easier to understand:

// Label a loop, and also make a label that will jump immediately past it.
#define LOOP_LABEL( NAME ) \
    if ( false ) { \
        LOOP_BREAK_ ## NAME: ; \
    } else \
        NAME: // Loop goes here.

// Jump past the end of the given loop. NB: works inside other loops!
#define LOOP_BREAK( NAME ) \
    goto LOOP_BREAK_ ## NAME // Semicolon goes here.

Not bad, for the preprocessor, but there=E2=80=99s no continue emulation. (=
You could get that by making the entire loop body a macro argument. I=E2=80=
=99ll leave that as an exercise for the reader.)

--=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/.

--Apple-Mail=_2493D952-2AD5-4440-9CEE-10BCABFE504A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9328, at 1:55 PM, TONGARI J &lt;<a href=3D"mailto:tongari95@gmail.co=
m" class=3D"">tongari95@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-in=
terchange-newline"><div class=3D""><span style=3D"font-family: Helvetica; f=
ont-size: 12px; font-style: normal; font-variant: normal; font-weight: norm=
al; letter-spacing: normal; line-height: normal; orphans: auto; text-align:=
 start; text-indent: 0px; text-transform: none; white-space: normal; widows=
: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; dis=
play: inline !important;" class=3D"">Or we can use poor-man's labeled-break=
:</span><br class=3D"Apple-interchange-newline"></div></blockquote></div><b=
r class=3D""><div class=3D"">The <font face=3D"Courier" class=3D"">$</font>=
 character is not legal C++, and there are several obfuscation tactics in p=
lay there. Hopefully this is a little easier to understand:</div><div class=
=3D""><br class=3D""></div><div class=3D""><font face=3D"Courier" class=3D"=
">//&nbsp;Label a loop, and also make a label that will jump immediately pa=
st it.</font></div><div class=3D""><font face=3D"Courier" class=3D"">#defin=
e LOOP_LABEL(&nbsp;NAME&nbsp;)&nbsp;\<br class=3D"">&nbsp; &nbsp; if&nbsp;(=
&nbsp;false ) { \</font></div><div class=3D""><font face=3D"Courier" class=
=3D"">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font><span style=3D"font-family: C=
ourier;" class=3D"">LOOP_BREAK</span><font face=3D"Courier" class=3D"">_ ##=
&nbsp;NAME: ; \</font></div><div class=3D""><font face=3D"Courier" class=3D=
"">&nbsp; &nbsp; } else \</font></div><div class=3D""><font face=3D"Courier=
" class=3D"">&nbsp; &nbsp; &nbsp; &nbsp; NAME: // Loop goes here.<br class=
=3D""><br class=3D"">// Jump past the end of the given loop. NB: works&nbsp=
;inside other loops!<br class=3D"">#define&nbsp;L</font><span style=3D"font=
-family: Courier;" class=3D"">OO</span><font face=3D"Courier" class=3D"">P_=
BREAK( NAME )&nbsp;\<br class=3D"">&nbsp; &nbsp; goto&nbsp;</font><span sty=
le=3D"font-family: Courier;" class=3D"">L</span><span style=3D"font-family:=
 Courier;" class=3D"">OO</span><span style=3D"font-family: Courier;" class=
=3D"">P_BREAK</span><font face=3D"Courier" class=3D"">_ ## NAME // Semicolo=
n goes here.<br class=3D""></font></div><div class=3D""><br class=3D""></di=
v><div class=3D"">Not bad, for the preprocessor, but there=E2=80=99s no <fo=
nt face=3D"Courier" class=3D"">continue</font> emulation. (You could get th=
at by making the entire loop body a macro argument. I=E2=80=99ll leave that=
 as an exercise for the reader.)</div></body></html>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_2493D952-2AD5-4440-9CEE-10BCABFE504A--

.


Author: TONGARI J <tongari95@gmail.com>
Date: Wed, 28 Jan 2015 22:01:08 +0800
Raw View
--089e01184e22a64471050db6cd88
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2015-01-28 21:14 GMT+08:00 David Krauss <potswa@gmail.com>:

>
> On 2015=E2=80=9301=E2=80=9328, at 1:55 PM, TONGARI J <tongari95@gmail.com=
> wrote:
>
> Or we can use poor-man's labeled-break:
>
>
> The $ character is not legal C++, and there are several obfuscation
> tactics in play there. Hopefully this is a little easier to understand:
>

Whether or not you can use $ is implementation defined.

// Label a loop, and also make a label that will jump immediately past it.
> #define LOOP_LABEL( NAME ) \
>     if ( false ) { \
>         LOOP_BREAK_ ## NAME: ; \
>     } else \
>         NAME: // Loop goes here.
>
> // Jump past the end of the given loop. NB: works inside other loops!
> #define LOOP_BREAK( NAME ) \
>     goto LOOP_BREAK_ ## NAME // Semicolon goes here.
>
> Not bad, for the preprocessor, but there=E2=80=99s no continue emulation.=
 (You
> could get that by making the entire loop body a macro argument. I=E2=80=
=99ll leave
> that as an exercise for the reader.)
>

The original one is safer because it prevents you from jumping to other
places not surrounding the break.

I don't need labeled-continue myself (I didn't read the proposal, I don't
know what it's for), and continue itself can be expressed in terms of
 labeled-break.

--=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/.

--089e01184e22a64471050db6cd88
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">2015=
-01-28 21:14 GMT+08:00 David Krauss <span dir=3D"ltr">&lt;<a href=3D"mailto=
:potswa@gmail.com" target=3D"_blank">potswa@gmail.com</a>&gt;</span>:<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;pad=
ding-left:1ex"><div style=3D"word-wrap:break-word"><span class=3D""><br><di=
v><blockquote type=3D"cite"><div>On 2015=E2=80=9301=E2=80=9328, at 1:55 PM,=
 TONGARI J &lt;<a href=3D"mailto:tongari95@gmail.com" target=3D"_blank">ton=
gari95@gmail.com</a>&gt; wrote:</div><br><div><span style=3D"font-family:He=
lvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:no=
rmal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:=
0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;disp=
lay:inline!important">Or we can use poor-man&#39;s labeled-break:</span><br=
></div></blockquote></div><br></span><div>The <font face=3D"Courier">$</fon=
t> character is not legal C++, and there are several obfuscation tactics in=
 play there. Hopefully this is a little easier to understand:</div></div></=
blockquote><div><br></div><div>Whether or not you can use $ is=C2=A0impleme=
ntation defined.=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color=
:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style=3D"w=
ord-wrap:break-word"><div><font face=3D"Courier">//=C2=A0Label a loop, and =
also make a label that will jump immediately past it.</font></div><div><fon=
t face=3D"Courier">#define LOOP_LABEL(=C2=A0NAME=C2=A0)=C2=A0\<br>=C2=A0 =
=C2=A0 if=C2=A0(=C2=A0false ) { \</font></div><div><font face=3D"Courier">=
=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0</font><span style=3D"font-family:Courier"=
>LOOP_BREAK</span><font face=3D"Courier">_ ##=C2=A0NAME: ; \</font></div><d=
iv><font face=3D"Courier">=C2=A0 =C2=A0 } else \</font></div><div><font fac=
e=3D"Courier">=C2=A0 =C2=A0 =C2=A0 =C2=A0 NAME: // Loop goes here.<br><br>/=
/ Jump past the end of the given loop. NB: works=C2=A0inside other loops!<b=
r>#define=C2=A0L</font><span style=3D"font-family:Courier">OO</span><font f=
ace=3D"Courier">P_BREAK( NAME )=C2=A0\<br>=C2=A0 =C2=A0 goto=C2=A0</font><s=
pan style=3D"font-family:Courier">L</span><span style=3D"font-family:Courie=
r">OO</span><span style=3D"font-family:Courier">P_BREAK</span><font face=3D=
"Courier">_ ## NAME // Semicolon goes here.<br></font></div><div><br></div>=
<div>Not bad, for the preprocessor, but there=E2=80=99s no <font face=3D"Co=
urier">continue</font> emulation. (You could get that by making the entire =
loop body a macro argument. I=E2=80=99ll leave that as an exercise for the =
reader.)</div></div></blockquote><div><br></div><div>The original one is sa=
fer because it prevents you from jumping to other places not surrounding th=
e break.</div><div><br></div><div>I don&#39;t need labeled-continue myself =
(I didn&#39;t read the proposal, I don&#39;t know what it&#39;s for), and c=
ontinue itself can be expressed in terms of =C2=A0labeled-break.</div></div=
></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e01184e22a64471050db6cd88--

.


Author: David Krauss <potswa@gmail.com>
Date: Thu, 29 Jan 2015 08:46:35 +0800
Raw View
--Apple-Mail=_754E1BC9-E88A-4B1B-94AC-789877DC09D6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9301=E2=80=9328, at 10:01 PM, TONGARI J <tongari95@gmail.co=
m> wrote:
>=20
> 2015-01-28 21:14 GMT+08:00 David Krauss <potswa@gmail.com <mailto:potswa@=
gmail.com>>:
>=20
>> On 2015=E2=80=9301=E2=80=9328, at 1:55 PM, TONGARI J <tongari95@gmail.co=
m <mailto:tongari95@gmail.com>> wrote:
>>=20
>> Or we can use poor-man's labeled-break:
>=20
> The $ character is not legal C++, and there are several obfuscation tacti=
cs in play there. Hopefully this is a little easier to understand:
>=20
> Whether or not you can use $ is implementation defined.=20

$ is translated to a universal-character-name in phase 1, and it=E2=80=99s =
not in the list of UCNs allowed in identifiers. Therefore it=E2=80=99s ill-=
formed.

> The original one is safer because it prevents you from jumping to other p=
laces not surrounding the break.

Fair nuff. I didn=E2=80=99t grok the purpose of the declaration in the if. =
That also disables gotos into the loop, but if you=E2=80=99re using this in=
 the first place, that=E2=80=99s probably not a concern.

> I don't need labeled-continue myself (I didn't read the proposal, I don't=
 know what it's for), and continue itself can be expressed in terms of  lab=
eled-break.

Only if the would-be labels of continue and break would coincide, which won=
=E2=80=99t happen unless you=E2=80=99re in a loop which is the last stateme=
nt in the enclosing loop.

--=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/.

--Apple-Mail=_754E1BC9-E88A-4B1B-94AC-789877DC09D6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9328, at 10:01 PM, TONGARI J &lt;<a href=3D"mailto:tongari95@gmail.c=
om" class=3D"">tongari95@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-i=
nterchange-newline"><div class=3D""><div dir=3D"ltr" class=3D""><div class=
=3D"gmail_extra"><div class=3D"gmail_quote">2015-01-28 21:14 GMT+08:00 Davi=
d Krauss <span dir=3D"ltr" class=3D"">&lt;<a href=3D"mailto:potswa@gmail.co=
m" target=3D"_blank" class=3D"">potswa@gmail.com</a>&gt;</span>:<br class=
=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:s=
olid;padding-left:1ex"><div style=3D"word-wrap:break-word" class=3D""><span=
 class=3D""><br class=3D""><div class=3D""><blockquote type=3D"cite" class=
=3D""><div class=3D"">On 2015=E2=80=9301=E2=80=9328, at 1:55 PM, TONGARI J =
&lt;<a href=3D"mailto:tongari95@gmail.com" target=3D"_blank" class=3D"">ton=
gari95@gmail.com</a>&gt; wrote:</div><br class=3D""><div class=3D""><span s=
tyle=3D"font-family:Helvetica;font-size:12px;font-style:normal;font-variant=
:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-al=
ign:start;text-indent:0px;text-transform:none;white-space:normal;word-spaci=
ng:0px;float:none;display:inline!important" class=3D"">Or we can use poor-m=
an's labeled-break:</span><br class=3D""></div></blockquote></div><br class=
=3D""></span><div class=3D"">The <font face=3D"Courier" class=3D"">$</font>=
 character is not legal C++, and there are several obfuscation tactics in p=
lay there. Hopefully this is a little easier to understand:</div></div></bl=
ockquote><div class=3D""><br class=3D""></div><div class=3D"">Whether or no=
t you can use $ is&nbsp;implementation defined.&nbsp;</div></div></div></di=
v></div></blockquote><div><br class=3D""></div><div><font face=3D"Courier" =
class=3D"">$</font> is translated to a universal-character-name in phase 1,=
 and it=E2=80=99s not in the list of UCNs allowed in identifiers. Therefore=
 it=E2=80=99s ill-formed.</div><br class=3D""><blockquote type=3D"cite" cla=
ss=3D""><div dir=3D"ltr" class=3D""><div class=3D"gmail_extra"><div class=
=3D"gmail_quote"><div class=3D"">The original one is safer because it preve=
nts you from jumping to other places not surrounding the break.</div></div>=
</div></div></blockquote><div><br class=3D""></div><div>Fair nuff. I didn=
=E2=80=99t grok the purpose of the declaration in the <font face=3D"Courier=
" class=3D"">if</font>. That also disables&nbsp;<font face=3D"Courier" clas=
s=3D"">goto</font>s into the loop, but if you=E2=80=99re using this in the =
first place, that=E2=80=99s probably not a concern.</div><br class=3D""><bl=
ockquote type=3D"cite" class=3D""><div dir=3D"ltr" class=3D""><div class=3D=
"gmail_extra"><div class=3D"gmail_quote"><div class=3D"">I don't need label=
ed-continue myself (I didn't read the proposal, I don't know what it's for)=
, and continue itself can be expressed in terms of &nbsp;labeled-break.</di=
v></div></div></div></blockquote><div><br class=3D""></div><div>Only if the=
 would-be labels of continue and break would coincide, which won=E2=80=99t =
happen unless you=E2=80=99re in a loop which is the last statement in the e=
nclosing loop.</div></div></body></html>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_754E1BC9-E88A-4B1B-94AC-789877DC09D6--

.