Topic: Do ... while structure improvement


Author: contact@ncomputers.org
Date: Wed, 15 Oct 2014 10:33:06 -0700 (PDT)
Raw View
------=_Part_417_977606866.1413394386641
Content-Type: text/plain; charset=UTF-8

Do ... while structure improvement
Sometimes the use of jumps such as: continue, break, goto, calls to a
function, etc. is necessary to avoid the execution of some instructions.

For example: A loop requires auxiliary variables, which change each cycle,
but after the last one, they must either remain unchanged or it is useless
to change them.

This is the case of the seed, warp and swap loops of this solution for the
n queens problem
<http://ncomputers.org/content/code.php?src=n-queens/n-queens.cpp>.

To avoid the use of jumps or tricks on some of these cases, we are
suggesting the below improvement to the *do ... while loop structure*.

*Examples: *Print arrays separating its elements
<http://ncomputers.org/content/code.php?src=examples/do%20while%201.cpp>

/* author: ncomputers.org */
 int main(){
     unsigned int loop1=0;
     unsigned int loop2;
     unsigned int result=0;
     unsigned int auxiliary1=1,auxiliary2=2,auxiliary3=3;
     while(loop1++<1000000000){
         /*
         * Allow initializers (extra improvement)
         */
         do(loop2=0){
             result+=auxiliary1;
             result-=auxiliary2;
             result*=auxiliary3;
         }while(++loop2<10){
             /*
             * Statements that will happen after the execution of each cycle
             * and only if there is a next cycle.
             */
             auxiliary1+=auxiliary3;
             auxiliary2*=auxiliary1;
             auxiliary3-=auxiliary2;
         }
     }
     return 0;
 }

Best regards,

http://ncomputers.org
<http://ncomputers.org/content/code.php?src=suggestions/do%20while.cpp>


--

---
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_417_977606866.1413394386641
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><h1>Do ... while structure improvement</h1><br>Sometimes t=
he use of jumps such as: continue, break, goto, calls to a=20
function, etc. is necessary to avoid the execution of some instructions.<br=
><br>
For example: A loop requires auxiliary variables, which change each=20
cycle, but after the last one, they must either remain unchanged or it=20
is useless to change them.<br><br>
This is the case of the seed, warp and swap loops of this <a href=3D"http:/=
/ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp">solution for =
the n queens problem</a>.<br><br>
To avoid the use of jumps or tricks on some of these cases, we are suggesti=
ng the below improvement to the <b>do ... while loop structure</b>.<br><br>
<b>Examples: </b><a href=3D"http://ncomputers.org/content/code.php?src=3Dex=
amples/do%20while%201.cpp">Print arrays separating its elements</a><br><br>=
<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; wo=
rd-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span style=3D"color: #800;" class=3D"styled-by-prettify">/* author: n=
computers.org */</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>&nbsp;</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">int</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
main</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(){</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &n=
bsp; &nbsp;</span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>unsigned</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> loop1</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">0</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;</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">unsigned</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">int</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> loop2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>&nbsp; &nbsp; &nbsp;</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">unsigned</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> result</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">=3D</span><span style=3D"color: #066;" class=3D"styled-by-prettify">0<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &n=
bsp;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">unsign=
ed</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> auxiliary1</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">=3D</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: #000;" =
class=3D"styled-by-prettify">auxiliary2</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">2</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">auxiliary3</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">=3D</span><span style=3D"color: #066;" class=3D"styled-by-prettify">3=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &=
nbsp;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">while=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">loop1</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">++&lt;</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">1000000000</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">){</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbs=
p;</span><span style=3D"color: #800;" class=3D"styled-by-prettify">/*<br>&n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp;* Allow initializers (extra improvement)<br=
>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">do</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">loop2</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">0</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">){</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">+=3D</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">auxiliary1</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp;result</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">-=3D</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">auxiliary2</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">*=3D</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">auxiliary3</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">while</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(++</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">loop2</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #066;" =
class=3D"styled-by-prettify">10</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; &nbsp; &nbsp; &nbsp;</span><sp=
an style=3D"color: #800;" class=3D"styled-by-prettify">/*<br>&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Statements that will happen after the e=
xecution of each cycle<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*=
 and only if there is a next cycle.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp;*/</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;auxiliary1</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">+=3D</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">auxiliary3</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>&nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp;auxiliary2</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">*=3D</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">auxiliary1</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;auxiliary3</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">-=3D</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">auxiliary2</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp;</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;</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;</span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp;</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><br>Bes=
t regards,<br><br><a href=3D"http://ncomputers.org/content/code.php?src=3Ds=
uggestions/do%20while.cpp">http://ncomputers.org</a><br><br><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_417_977606866.1413394386641--

.


Author: Pablo Oliva <pabloliva87@gmail.com>
Date: Wed, 15 Oct 2014 14:55:03 -0300
Raw View
--001a11c36b72d04427050579d42e
Content-Type: text/plain; charset=UTF-8

So, IIUC:

do (*statement*)
{
// *A*
}
while (*condition*)
{
// *B*
}

will run statement before entering the loop, will perform A inconditionally
one time, will check condition, and if condition holds, it will run B and
then A, then check condition again, and so on?

It seems somewhat contrived. Moving *statement* before the loop seems
semantically equivalent. And having two different code blocks depending on
the same condition appears hard to read.

Also, are variables declared in block B visible in block A, or are they two
completely separated code blocks?

2014-10-15 14:33 GMT-03:00 <contact@ncomputers.org>:

> Do ... while structure improvement
> Sometimes the use of jumps such as: continue, break, goto, calls to a
> function, etc. is necessary to avoid the execution of some instructions.
>
> For example: A loop requires auxiliary variables, which change each cycle,
> but after the last one, they must either remain unchanged or it is useless
> to change them.
>
> This is the case of the seed, warp and swap loops of this solution for
> the n queens problem
> <http://ncomputers.org/content/code.php?src=n-queens/n-queens.cpp>.
>
> To avoid the use of jumps or tricks on some of these cases, we are
> suggesting the below improvement to the *do ... while loop structure*.
>
> *Examples: *Print arrays separating its elements
> <http://ncomputers.org/content/code.php?src=examples/do%20while%201.cpp>
>
> /* author: ncomputers.org */
>  int main(){
>      unsigned int loop1=0;
>      unsigned int loop2;
>      unsigned int result=0;
>      unsigned int auxiliary1=1,auxiliary2=2,auxiliary3=3;
>      while(loop1++<1000000000){
>          /*
>          * Allow initializers (extra improvement)
>          */
>          do(loop2=0){
>              result+=auxiliary1;
>              result-=auxiliary2;
>              result*=auxiliary3;
>          }while(++loop2<10){
>              /*
>              * Statements that will happen after the execution of each
> cycle
>              * and only if there is a next cycle.
>              */
>              auxiliary1+=auxiliary3;
>              auxiliary2*=auxiliary1;
>              auxiliary3-=auxiliary2;
>          }
>      }
>      return 0;
>  }
>
> Best regards,
>
> http://ncomputers.org
> <http://ncomputers.org/content/code.php?src=suggestions/do%20while.cpp>
>
>
>  --
>
> ---
> 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/.

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

<div dir=3D"ltr">So, IIUC:<div><br></div><div>do (<b>statement</b>)</div><d=
iv>{</div><div>// <b>A</b></div><div>}</div><div>while (<b>condition</b>)</=
div><div>{</div><div>// <b>B</b></div><div>}</div><div><br></div><div>will =
run statement before entering the loop, will perform A inconditionally one =
time, will check condition, and if condition holds, it will run B and then =
A, then check condition again, and so on?</div><div><br></div><div>It seems=
 somewhat contrived. Moving <b>statement</b> before the loop seems semantic=
ally equivalent. And having two different code blocks depending on the same=
 condition appears hard to read.</div><div><br></div><div>Also, are variabl=
es declared in block B visible in block A, or are they two completely separ=
ated code blocks?</div></div><div class=3D"gmail_extra"><br><div class=3D"g=
mail_quote">2014-10-15 14:33 GMT-03:00  <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:contact@ncomputers.org" target=3D"_blank">contact@ncomputers.org</a>&g=
t;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><h1>Do ... wh=
ile structure improvement</h1><br>Sometimes the use of jumps such as: conti=
nue, break, goto, calls to a=20
function, etc. is necessary to avoid the execution of some instructions.<br=
><br>
For example: A loop requires auxiliary variables, which change each=20
cycle, but after the last one, they must either remain unchanged or it=20
is useless to change them.<br><br>
This is the case of the seed, warp and swap loops of this <a href=3D"http:/=
/ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp" target=3D"_bl=
ank">solution for the n queens problem</a>.<br><br>
To avoid the use of jumps or tricks on some of these cases, we are suggesti=
ng the below improvement to the <b>do ... while loop structure</b>.<br><br>
<b>Examples: </b><a href=3D"http://ncomputers.org/content/code.php?src=3Dex=
amples/do%20while%201.cpp" target=3D"_blank">Print arrays separating its el=
ements</a><br><br><div style=3D"background-color:rgb(250,250,250);border-co=
lor:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-wo=
rd"><code><div><span style=3D"color:#800">/* author: <a href=3D"http://ncom=
puters.org" target=3D"_blank">ncomputers.org</a> */</span><span style=3D"co=
lor:#000"><br>=C2=A0</span><span style=3D"color:#008">int</span><span style=
=3D"color:#000"> main</span><span style=3D"color:#660">(){</span><span styl=
e=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"color:#008">=
unsigned</span><span style=3D"color:#000"> </span><span style=3D"color:#008=
">int</span><span style=3D"color:#000"> loop1</span><span style=3D"color:#6=
60">=3D</span><span style=3D"color:#066">0</span><span style=3D"color:#660"=
>;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0</span><span st=
yle=3D"color:#008">unsigned</span><span style=3D"color:#000"> </span><span =
style=3D"color:#008">int</span><span style=3D"color:#000"> loop2</span><spa=
n style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0=
 =C2=A0</span><span style=3D"color:#008">unsigned</span><span style=3D"colo=
r:#000"> </span><span style=3D"color:#008">int</span><span style=3D"color:#=
000"> result</span><span style=3D"color:#660">=3D</span><span style=3D"colo=
r:#066">0</span><span style=3D"color:#660">;</span><span style=3D"color:#00=
0"><br>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"color:#008">unsigned</span=
><span style=3D"color:#000"> </span><span style=3D"color:#008">int</span><s=
pan style=3D"color:#000"> auxiliary1</span><span style=3D"color:#660">=3D</=
span><span style=3D"color:#066">1</span><span style=3D"color:#660">,</span>=
<span style=3D"color:#000">auxiliary2</span><span style=3D"color:#660">=3D<=
/span><span style=3D"color:#066">2</span><span style=3D"color:#660">,</span=
><span style=3D"color:#000">auxiliary3</span><span style=3D"color:#660">=3D=
</span><span style=3D"color:#066">3</span><span style=3D"color:#660">;</spa=
n><span style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"=
color:#008">while</span><span style=3D"color:#660">(</span><span style=3D"c=
olor:#000">loop1</span><span style=3D"color:#660">++&lt;</span><span style=
=3D"color:#066">1000000000</span><span style=3D"color:#660">){</span><span =
style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span sty=
le=3D"color:#800">/*<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Allow initializ=
ers (extra improvement)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/</span><span=
 style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span st=
yle=3D"color:#008">do</span><span style=3D"color:#660">(</span><span style=
=3D"color:#000">loop2</span><span style=3D"color:#660">=3D</span><span styl=
e=3D"color:#066">0</span><span style=3D"color:#660">){</span><span style=3D=
"color:#000"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0result</sp=
an><span style=3D"color:#660">+=3D</span><span style=3D"color:#000">auxilia=
ry1</span><span style=3D"color:#660">;</span><span style=3D"color:#000"><br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0result</span><span style=
=3D"color:#660">-=3D</span><span style=3D"color:#000">auxiliary2</span><spa=
n style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0result</span><span style=3D"color:#660">=
*=3D</span><span style=3D"color:#000">auxiliary3</span><span style=3D"color=
:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0</span><span style=3D"color:#660">}</span><span style=3D"color:#008">=
while</span><span style=3D"color:#660">(++</span><span style=3D"color:#000"=
>loop2</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#06=
6">10</span><span style=3D"color:#660">){</span><span style=3D"color:#000">=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span style=3D"c=
olor:#800">/*<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Statemen=
ts that will happen after the execution of each cycle<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* and only if there is a next cycle.<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/</span><span style=3D"color:=
#000"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0auxiliary1</span>=
<span style=3D"color:#660">+=3D</span><span style=3D"color:#000">auxiliary3=
</span><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0auxiliary2</span><span styl=
e=3D"color:#660">*=3D</span><span style=3D"color:#000">auxiliary1</span><sp=
an style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0auxiliary3</span><span style=3D"color=
:#660">-=3D</span><span style=3D"color:#000">auxiliary2</span><span style=
=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0</span><span style=3D"color:#660">}</span><span style=3D"colo=
r:#000"><br>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"color:#660">}</span><=
span style=3D"color:#000"><br>=C2=A0 =C2=A0 =C2=A0</span><span style=3D"col=
or:#008">return</span><span style=3D"color:#000"> </span><span style=3D"col=
or:#066">0</span><span style=3D"color:#660">;</span><span style=3D"color:#0=
00"><br>=C2=A0</span><span style=3D"color:#660">}</span><span style=3D"colo=
r:#000"><br></span></div></code></div><br>Best regards,<br><br><a href=3D"h=
ttp://ncomputers.org/content/code.php?src=3Dsuggestions/do%20while.cpp" tar=
get=3D"_blank">http://ncomputers.org</a><span class=3D"HOEnZb"><font color=
=3D"#888888"><br><br><br></font></span></div><span class=3D"HOEnZb"><font c=
olor=3D"#888888">

<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>
</font></span></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 />

--001a11c36b72d04427050579d42e--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Wed, 15 Oct 2014 14:17:09 -0400
Raw View
On 2014-10-15 13:55, Pablo Oliva wrote:
> So, IIUC:
>
> do (*statement*)
> {
> // *A*
> }
> while (*condition*)
> {
> // *B*
> }

  statement;
  for (;;)
  {
    a;
    if (!condition)
      break;
    b;
  }

Do I miss something?

--
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: contact@ncomputers.org
Date: Wed, 15 Oct 2014 11:20:47 -0700 (PDT)
Raw View
------=_Part_2638_268965842.1413397247337
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you very much for your answer and your time!

For example:

unsigned size=3D10;
unsigned*array=3Dnew unsigned[size];

if(size<1)throw "At least one element is required";

do(unsigned a=3D0){
    cout<<array[a];
}
while(++a<10){
    cout<<',';
}

It will check condition only one time per cycle. Variables declared in=20
block A should be visible in block B.

Best regards,

http://ncomputers.org

El mi=C3=A9rcoles, 15 de octubre de 2014 12:55:07 UTC-5, Pablo Oliva escrib=
i=C3=B3:
>
> So, IIUC:
>
> do (*statement*)
> {
> // *A*
> }
> while (*condition*)
> {
> // *B*
> }
>
> will run statement before entering the loop, will perform A=20
> inconditionally one time, will check condition, and if condition holds, i=
t=20
> will run B and then A, then check condition again, and so on?
>
> It seems somewhat contrived. Moving *statement* before the loop seems=20
> semantically equivalent. And having two different code blocks depending o=
n=20
> the same condition appears hard to read.
>
> Also, are variables declared in block B visible in block A, or are they=
=20
> two completely separated code blocks?
>
> 2014-10-15 14:33 GMT-03:00 <con...@ncomputers.org <javascript:>>:
>
>> Do ... while structure improvement
>> Sometimes the use of jumps such as: continue, break, goto, calls to a=20
>> function, etc. is necessary to avoid the execution of some instructions.
>>
>> For example: A loop requires auxiliary variables, which change each=20
>> cycle, but after the last one, they must either remain unchanged or it i=
s=20
>> useless to change them.
>>
>> This is the case of the seed, warp and swap loops of this solution for=
=20
>> the n queens problem=20
>> <http://ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp>.
>>
>> To avoid the use of jumps or tricks on some of these cases, we are=20
>> suggesting the below improvement to the *do ... while loop structure*.
>>
>> *Examples: *Print arrays separating its elements=20
>> <http://ncomputers.org/content/code.php?src=3Dexamples/do%20while%201.cp=
p>
>>
>> /* author: ncomputers.org */
>>  int main(){
>>      unsigned int loop1=3D0;
>>      unsigned int loop2;
>>      unsigned int result=3D0;
>>      unsigned int auxiliary1=3D1,auxiliary2=3D2,auxiliary3=3D3;
>>      while(loop1++<1000000000){
>>          /*
>>          * Allow initializers (extra improvement)
>>          */
>>          do(loop2=3D0){
>>              result+=3Dauxiliary1;
>>              result-=3Dauxiliary2;
>>              result*=3Dauxiliary3;
>>          }while(++loop2<10){
>>              /*
>>              * Statements that will happen after the execution of each=
=20
>> cycle
>>              * and only if there is a next cycle.
>>              */
>>              auxiliary1+=3Dauxiliary3;
>>              auxiliary2*=3Dauxiliary1;
>>              auxiliary3-=3Dauxiliary2;
>>          }
>>      }
>>      return 0;
>>  }
>>
>> Best regards,
>>
>> http://ncomputers.org=20
>> <http://ncomputers.org/content/code.php?src=3Dsuggestions/do%20while.cpp=
>
>>
>>
>>  --=20
>>
>> ---=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> Visit this group at=20
>> 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/.

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

<div dir=3D"ltr">Thank you very much for your answer and your time!<br><br>=
For example:<br><br><div class=3D"prettyprint" style=3D"background-color: r=
gb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; b=
order-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div =
class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">unsigned</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> size</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>=3D</span><span style=3D"color: #066;" class=3D"styled-by-prettify">10</sp=
an><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: #008;" class=3D"styled-by-prettify">unsigned</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">*</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">array</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">new</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">unsigned</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">[</span><span style=3D"color: #000;" class=3D"styled-by-prettify">s=
ize</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></span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">if</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">size</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</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: #008;" class=3D"styled-by=
-prettify">throw</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">"At=
 least one element is required"</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br><br></span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">do</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">unsigne=
d</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> a</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span s=
tyle=3D"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">){</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br>&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">array</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">[</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">a</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">];</span><span style=3D"color: #000;" class=3D"styl=
ed-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><span style=3D"color: #008;" class=3D"styled-by-prettify">while=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(++</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">a</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #066;" class=3D"styled-by-prettify">10</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; cout</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"color:=
 #080;" 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"><br></span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br></span></div></code></div><br>It will check condition only one ti=
me per cycle. Variables declared in block A should be visible in block B.<b=
r><br>Best regards,<br><br><a href=3D"http://ncomputers.org">http://ncomput=
ers.org</a><br><br>El mi=C3=A9rcoles, 15 de octubre de 2014 12:55:07 UTC-5,=
 Pablo Oliva escribi=C3=B3:<blockquote class=3D"gmail_quote" style=3D"margi=
n: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><di=
v dir=3D"ltr">So, IIUC:<div><br></div><div>do (<b>statement</b>)</div><div>=
{</div><div>// <b>A</b></div><div>}</div><div>while (<b>condition</b>)</div=
><div>{</div><div>// <b>B</b></div><div>}</div><div><br></div><div>will run=
 statement before entering the loop, will perform A inconditionally one tim=
e, will check condition, and if condition holds, it will run B and then A, =
then check condition again, and so on?</div><div><br></div><div>It seems so=
mewhat contrived. Moving <b>statement</b> before the loop seems semanticall=
y equivalent. And having two different code blocks depending on the same co=
ndition appears hard to read.</div><div><br></div><div>Also, are variables =
declared in block B visible in block A, or are they two completely separate=
d code blocks?</div></div><div><br><div class=3D"gmail_quote">2014-10-15 14=
:33 GMT-03:00  <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'java=
script:';return true;" onclick=3D"this.href=3D'javascript:';return true;">c=
on...@ncomputers.org</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
 dir=3D"ltr"><h1>Do ... while structure improvement</h1><br>Sometimes the u=
se of jumps such as: continue, break, goto, calls to a=20
function, etc. is necessary to avoid the execution of some instructions.<br=
><br>
For example: A loop requires auxiliary variables, which change each=20
cycle, but after the last one, they must either remain unchanged or it=20
is useless to change them.<br><br>
This is the case of the seed, warp and swap loops of this <a href=3D"http:/=
/ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp" target=3D"_bl=
ank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2=
Fncomputers.org%2Fcontent%2Fcode.php%3Fsrc%3Dn-queens%2Fn-queens.cpp\46sa\7=
5D\46sntz\0751\46usg\75AFQjCNGRYtQ9TTUZXhjJUcPnN8rzaDL_3g';return true;" on=
click=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fncomputers=
..org%2Fcontent%2Fcode.php%3Fsrc%3Dn-queens%2Fn-queens.cpp\46sa\75D\46sntz\0=
751\46usg\75AFQjCNGRYtQ9TTUZXhjJUcPnN8rzaDL_3g';return true;">solution for =
the n queens problem</a>.<br><br>
To avoid the use of jumps or tricks on some of these cases, we are suggesti=
ng the below improvement to the <b>do ... while loop structure</b>.<br><br>
<b>Examples: </b><a href=3D"http://ncomputers.org/content/code.php?src=3Dex=
amples/do%20while%201.cpp" target=3D"_blank" onmousedown=3D"this.href=3D'ht=
tp://www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.ph=
p%3Fsrc%3Dexamples%2Fdo%2520while%25201.cpp\46sa\75D\46sntz\0751\46usg\75AF=
QjCNGjqkkMP6ZG6SElmIVwVmkplfSr-g';return true;" onclick=3D"this.href=3D'htt=
p://www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php=
%3Fsrc%3Dexamples%2Fdo%2520while%25201.cpp\46sa\75D\46sntz\0751\46usg\75AFQ=
jCNGjqkkMP6ZG6SElmIVwVmkplfSr-g';return true;">Print arrays separating its =
elements</a><br><br><div style=3D"background-color:rgb(250,250,250);border-=
color:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-=
word"><code><div><span style=3D"color:#800">/* author: <a href=3D"http://nc=
omputers.org" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.goog=
le.com/url?q\75http%3A%2F%2Fncomputers.org\46sa\75D\46sntz\0751\46usg\75AFQ=
jCNGu9y3wXgJPa-68kCF9PEFnWBBJpQ';return true;" onclick=3D"this.href=3D'http=
://www.google.com/url?q\75http%3A%2F%2Fncomputers.org\46sa\75D\46sntz\0751\=
46usg\75AFQjCNGu9y3wXgJPa-68kCF9PEFnWBBJpQ';return true;">ncomputers.org</a=
> */</span><span style=3D"color:#000"><br>&nbsp;</span><span style=3D"color=
:#008">int</span><span style=3D"color:#000"> main</span><span style=3D"colo=
r:#660">(){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span=
><span style=3D"color:#008">unsigned</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#008">int</span><span style=3D"color:#000"> loop1</=
span><span style=3D"color:#660">=3D</span><span style=3D"color:#066">0</spa=
n><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; =
&nbsp; &nbsp;</span><span style=3D"color:#008">unsigned</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">int</span><span style=3D=
"color:#000"> loop2</span><span style=3D"color:#660">;</span><span style=3D=
"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=3D"color:#008">unsi=
gned</span><span style=3D"color:#000"> </span><span style=3D"color:#008">in=
t</span><span style=3D"color:#000"> result</span><span style=3D"color:#660"=
>=3D</span><span style=3D"color:#066">0</span><span style=3D"color:#660">;<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=
=3D"color:#008">unsigned</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#008">int</span><span style=3D"color:#000"> auxiliary1</span><s=
pan style=3D"color:#660">=3D</span><span style=3D"color:#066">1</span><span=
 style=3D"color:#660">,</span><span style=3D"color:#000">auxiliary2</span><=
span style=3D"color:#660">=3D</span><span style=3D"color:#066">2</span><spa=
n style=3D"color:#660">,</span><span style=3D"color:#000">auxi<wbr>liary3</=
span><span style=3D"color:#660">=3D</span><span style=3D"color:#066">3</spa=
n><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; =
&nbsp; &nbsp;</span><span style=3D"color:#008">while</span><span style=3D"c=
olor:#660">(</span><span style=3D"color:#000">loop1</span><span style=3D"co=
lor:#660">++&lt;</span><span style=3D"color:#066">1000000000</span><span st=
yle=3D"color:#660">){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp;</span><span style=3D"color:#800">/*<br>&nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp;* Allow initializers (extra improvement)<br>&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp;*/</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp;</span><span style=3D"color:#008">do</span><span style=
=3D"color:#660">(</span><span style=3D"color:#000">loop2</span><span style=
=3D"color:#660">=3D</span><span style=3D"color:#066">0</span><span style=3D=
"color:#660">){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp;result</span><span style=3D"color:#660">+=3D</spa=
n><span style=3D"color:#000">auxiliary1</span><span style=3D"color:#660">;<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp;result</span><span style=3D"color:#660">-=3D</span><span style=3D=
"color:#000">auxiliary2</span><span style=3D"color:#660">;</span><span styl=
e=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result=
</span><span style=3D"color:#660">*=3D</span><span style=3D"color:#000">aux=
iliary3</span><span style=3D"color:#660">;</span><span style=3D"color:#000"=
><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#008">while</span><span style=3D"color:#660">(++=
</span><span style=3D"color:#000">loop2</span><span style=3D"color:#660">&l=
t;</span><span style=3D"color:#066">10</span><span style=3D"color:#660">){<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp;</span><span style=3D"color:#800">/*<br>&nbsp; &nbsp; &nbsp; &nbs=
p; &nbsp; &nbsp; &nbsp;* Statements that will happen after the execution of=
 each cycle<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* and only i=
f there is a next cycle.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
;*/</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp;auxiliary1</span><span style=3D"color:#660">+=3D</span><span =
style=3D"color:#000">auxiliary3</span><span style=3D"color:#660">;</span><s=
pan style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbs=
p;auxiliary2</span><span style=3D"color:#660">*=3D</span><span style=3D"col=
or:#000">auxiliary1</span><span style=3D"color:#660">;</span><span style=3D=
"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;auxiliary3=
</span><span style=3D"color:#660">-=3D</span><span style=3D"color:#000">aux=
iliary2</span><span style=3D"color:#660">;</span><span style=3D"color:#000"=
><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=
=3D"color:#660">}</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;=
</span><span style=3D"color:#008">return</span><span style=3D"color:#000"> =
</span><span style=3D"color:#066">0</span><span style=3D"color:#660">;</spa=
n><span style=3D"color:#000"><br>&nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#000"><br></span></div></code></div><br>Best reg=
ards,<br><br><a href=3D"http://ncomputers.org/content/code.php?src=3Dsugges=
tions/do%20while.cpp" target=3D"_blank" onmousedown=3D"this.href=3D'http://=
www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php%3Fs=
rc%3Dsuggestions%2Fdo%2520while.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNEfah=
GWYSkWCJPsOrRiKLqtk099Fg';return true;" onclick=3D"this.href=3D'http://www.=
google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php%3Fsrc%3=
Dsuggestions%2Fdo%2520while.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNEfahGWYS=
kWCJPsOrRiKLqtk099Fg';return true;">http://ncomputers.org</a><span><font co=
lor=3D"#888888"><br><br><br></font></span></div><span><font color=3D"#88888=
8">

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'javascript:';return true;" onclic=
k=3D"this.href=3D'javascript:';return true;">std-proposal...@<wbr>isocpp.or=
g</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'java=
script:';return true;" onclick=3D"this.href=3D'javascript:';return true;">s=
td-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" onmousedown=3D"this.href=3D'http://groups=
..google.com/a/isocpp.org/group/std-proposals/';return true;" onclick=3D"thi=
s.href=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';retur=
n true;">http://groups.google.com/a/<wbr>isocpp.org/group/std-<wbr>proposal=
s/</a>.<br>
</font></span></blockquote></div><br></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_2638_268965842.1413397247337--

.


Author: contact@ncomputers.org
Date: Wed, 15 Oct 2014 11:26:54 -0700 (PDT)
Raw View
------=_Part_484_1131590708.1413397614864
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you very much for your time and your answer!

Break is a jump. if(!condition)break; and for(;condition;) is a double=20
check of the condition.

Best regards,

http://ncomputers.org

El mi=C3=A9rcoles, 15 de octubre de 2014 13:17:26 UTC-5, Matthew Woehlke=20
escribi=C3=B3:
>
> On 2014-10-15 13:55, Pablo Oliva wrote:=20
> > So, IIUC:=20
> >=20
> > do (*statement*)=20
> > {=20
> > // *A*=20
> > }=20
> > while (*condition*)=20
> > {=20
> > // *B*=20
> > }=20
>
>   statement;=20
>   for (;;)=20
>   {=20
>     a;=20
>     if (!condition)=20
>       break;=20
>     b;=20
>   }=20
>
> Do I miss something?=20
>
> --=20
> Matthew=20
>
>

--=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_484_1131590708.1413397614864
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you very much for your time and your answer!<br><br>=
Break is a jump. if(!condition)break; and for(;condition;) is a double chec=
k of the condition.<br><br>Best regards,<br><br><a href=3D"http://ncomputer=
s.org">http://ncomputers.org</a><br><br>El mi=C3=A9rcoles, 15 de octubre de=
 2014 13:17:26 UTC-5, Matthew Woehlke escribi=C3=B3:<blockquote class=3D"gm=
ail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc soli=
d;padding-left: 1ex;">On 2014-10-15 13:55, Pablo Oliva wrote:
<br>&gt; So, IIUC:
<br>&gt;=20
<br>&gt; do (*statement*)
<br>&gt; {
<br>&gt; // *A*
<br>&gt; }
<br>&gt; while (*condition*)
<br>&gt; {
<br>&gt; // *B*
<br>&gt; }
<br>
<br>&nbsp; statement;
<br>&nbsp; for (;;)
<br>&nbsp; {
<br>&nbsp; &nbsp; a;
<br>&nbsp; &nbsp; if (!condition)
<br>&nbsp; &nbsp; &nbsp; break;
<br>&nbsp; &nbsp; b;
<br>&nbsp; }
<br>
<br>Do I miss something?
<br>
<br>--=20
<br>Matthew
<br>
<br></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_484_1131590708.1413397614864--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Wed, 15 Oct 2014 14:43:34 -0400
Raw View
On 2014-10-15 14:26, contact@ncomputers.org wrote:
> El mi=C3=A9rcoles, 15 de octubre de 2014 13:17:26 UTC-5, Matthew Woehlke=
=20
> escribi=C3=B3:
>>   statement;=20
>>   for (;;)=20
>>   {=20
>>     a;=20
>>     if (!condition)=20
>>       break;=20
>>     b;=20
>>   }=20
>>
>> Do I miss something?=20
>
> Break is a jump. if(!condition)break; and for(;condition;) is a double=20
> check of the condition.

So is 'while'; I don't see your point. The condition is checked only
once in the above code (note that there is no condition in the 'for').

The only advantage I see to your proposed syntax is the ability to
declare a variable in the 'do' that is local to the loop. I doubt very
much that a core language change would be accepted for so little benefit.

--=20
Matthew

--=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: contact@ncomputers.org
Date: Wed, 15 Oct 2014 11:44:03 -0700 (PDT)
Raw View
------=_Part_451_1805029445.1413398643243
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I'll try to answer better your questions.
=20

> will run statement before entering the loop, will perform A=20
> inconditionally one time, will check condition, and if condition holds, i=
t=20
> will run B and then A, then check condition again, and so on?
>

Yes.

It seems somewhat contrived. Moving *statement* before the loop seems=20
> semantically equivalent. And having two different code blocks depending o=
n=20
> the same condition appears hard to read.
>

It is more readable for us to have statement so:

unsigned a=3D0;

do(signed a=3D-1){
   //use signed a
   signed b;
}
while(condition){
   //use signed a
   //signed b unvisible.
}

//use unsigned a

Also, are variables declared in block B visible in block A, or are they two=
=20
> completely separated code blocks?
>

I wanted to say; variables declared on statement are visible in block A and=
=20
block B.

Best regards,

http://ncomputers.org


El mi=C3=A9rcoles, 15 de octubre de 2014 12:55:07 UTC-5, Pablo Oliva escrib=
i=C3=B3:
>
> So, IIUC:
>
> do (*statement*)
> {
> // *A*
> }
> while (*condition*)
> {
> // *B*
> }
>
> will run statement before entering the loop, will perform A=20
> inconditionally one time, will check condition, and if condition holds, i=
t=20
> will run B and then A, then check condition again, and so on?
>
> It seems somewhat contrived. Moving *statement* before the loop seems=20
> semantically equivalent. And having two different code blocks depending o=
n=20
> the same condition appears hard to read.
>
> Also, are variables declared in block B visible in block A, or are they=
=20
> two completely separated code blocks?
>
> 2014-10-15 14:33 GMT-03:00 <con...@ncomputers.org <javascript:>>:
>
>> Do ... while structure improvement
>> Sometimes the use of jumps such as: continue, break, goto, calls to a=20
>> function, etc. is necessary to avoid the execution of some instructions.
>>
>> For example: A loop requires auxiliary variables, which change each=20
>> cycle, but after the last one, they must either remain unchanged or it i=
s=20
>> useless to change them.
>>
>> This is the case of the seed, warp and swap loops of this solution for=
=20
>> the n queens problem=20
>> <http://ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp>.
>>
>> To avoid the use of jumps or tricks on some of these cases, we are=20
>> suggesting the below improvement to the *do ... while loop structure*.
>>
>> *Examples: *Print arrays separating its elements=20
>> <http://ncomputers.org/content/code.php?src=3Dexamples/do%20while%201.cp=
p>
>>
>> /* author: ncomputers.org */
>>  int main(){
>>      unsigned int loop1=3D0;
>>      unsigned int loop2;
>>      unsigned int result=3D0;
>>      unsigned int auxiliary1=3D1,auxiliary2=3D2,auxiliary3=3D3;
>>      while(loop1++<1000000000){
>>          /*
>>          * Allow initializers (extra improvement)
>>          */
>>          do(loop2=3D0){
>>              result+=3Dauxiliary1;
>>              result-=3Dauxiliary2;
>>              result*=3Dauxiliary3;
>>          }while(++loop2<10){
>>              /*
>>              * Statements that will happen after the execution of each=
=20
>> cycle
>>              * and only if there is a next cycle.
>>              */
>>              auxiliary1+=3Dauxiliary3;
>>              auxiliary2*=3Dauxiliary1;
>>              auxiliary3-=3Dauxiliary2;
>>          }
>>      }
>>      return 0;
>>  }
>>
>> Best regards,
>>
>> http://ncomputers.org=20
>> <http://ncomputers.org/content/code.php?src=3Dsuggestions/do%20while.cpp=
>
>>
>>
>>  --=20
>>
>> ---=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> Visit this group at=20
>> 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/.

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

<div dir=3D"ltr"><div>I'll try to answer better your questions.<br>&nbsp;</=
div><blockquote style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid =
rgb(204, 204, 204); padding-left: 1ex;" class=3D"gmail_quote"><div>will run=
 statement before entering the loop, will perform A=20
inconditionally one time, will check condition, and if condition holds,=20
it will run B and then A, then check condition again, and so on?</div></blo=
ckquote><div><br>Yes.<br><br></div><blockquote style=3D"margin: 0px 0px 0px=
 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" clas=
s=3D"gmail_quote"><div>It seems somewhat contrived. Moving <b>statement</b>
 before the loop seems semantically equivalent. And having two different
 code blocks depending on the same condition appears hard to read.</div></b=
lockquote><div><br>It is more readable for us to have statement so:<br><br>=
<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; wo=
rd-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span style=3D"color: #008;" class=3D"styled-by-prettify">unsigned</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br><br></span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">do</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">signed</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D-</span><span style=3D"color: #066;" class=3D"styled-by-prettify">1</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;</span=
><span style=3D"color: #800;" class=3D"styled-by-prettify">//use signed a</=
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">signe=
d</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> b</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span sty=
le=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: #0=
00;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">while</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">condition</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">){</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>&nbsp; &nbsp;</span><span style=3D"color: #800;" class=3D"styled-=
by-prettify">//use signed a</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>&nbsp; &nbsp;</span><span style=3D"color: #800;" class=
=3D"styled-by-prettify">//signed b unvisible.</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><br></span><span style=3D"color: #800;" class=3D"st=
yled-by-prettify">//use unsigned a</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span></div></code></div><br></div><blockquote=
 style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 2=
04); padding-left: 1ex;" class=3D"gmail_quote"><div>Also, are variables dec=
lared in block B visible in block A, or are they two completely separated c=
ode blocks?</div></blockquote><div><br>I wanted to say; variables declared =
on statement are visible in block A and block B.<br><br>Best regards,<br><b=
r><a href=3D"http://ncomputers.org">http://ncomputers.org</a><br></div><br>=
<br>El mi=C3=A9rcoles, 15 de octubre de 2014 12:55:07 UTC-5, Pablo Oliva es=
cribi=C3=B3:<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">S=
o, IIUC:<div><br></div><div>do (<b>statement</b>)</div><div>{</div><div>// =
<b>A</b></div><div>}</div><div>while (<b>condition</b>)</div><div>{</div><d=
iv>// <b>B</b></div><div>}</div><div><br></div><div>will run statement befo=
re entering the loop, will perform A inconditionally one time, will check c=
ondition, and if condition holds, it will run B and then A, then check cond=
ition again, and so on?</div><div><br></div><div>It seems somewhat contrive=
d. Moving <b>statement</b> before the loop seems semantically equivalent. A=
nd having two different code blocks depending on the same condition appears=
 hard to read.</div><div><br></div><div>Also, are variables declared in blo=
ck B visible in block A, or are they two completely separated code blocks?<=
/div></div><div><br><div class=3D"gmail_quote">2014-10-15 14:33 GMT-03:00  =
<span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfusca=
ted-mailto=3D"n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'javascript:';return=
 true;" onclick=3D"this.href=3D'javascript:';return true;">con...@ncomputer=
s.org</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><h=
1>Do ... while structure improvement</h1><br>Sometimes the use of jumps suc=
h as: continue, break, goto, calls to a=20
function, etc. is necessary to avoid the execution of some instructions.<br=
><br>
For example: A loop requires auxiliary variables, which change each=20
cycle, but after the last one, they must either remain unchanged or it=20
is useless to change them.<br><br>
This is the case of the seed, warp and swap loops of this <a href=3D"http:/=
/ncomputers.org/content/code.php?src=3Dn-queens/n-queens.cpp" target=3D"_bl=
ank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2=
Fncomputers.org%2Fcontent%2Fcode.php%3Fsrc%3Dn-queens%2Fn-queens.cpp\46sa\7=
5D\46sntz\0751\46usg\75AFQjCNGRYtQ9TTUZXhjJUcPnN8rzaDL_3g';return true;" on=
click=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fncomputers=
..org%2Fcontent%2Fcode.php%3Fsrc%3Dn-queens%2Fn-queens.cpp\46sa\75D\46sntz\0=
751\46usg\75AFQjCNGRYtQ9TTUZXhjJUcPnN8rzaDL_3g';return true;">solution for =
the n queens problem</a>.<br><br>
To avoid the use of jumps or tricks on some of these cases, we are suggesti=
ng the below improvement to the <b>do ... while loop structure</b>.<br><br>
<b>Examples: </b><a href=3D"http://ncomputers.org/content/code.php?src=3Dex=
amples/do%20while%201.cpp" target=3D"_blank" onmousedown=3D"this.href=3D'ht=
tp://www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.ph=
p%3Fsrc%3Dexamples%2Fdo%2520while%25201.cpp\46sa\75D\46sntz\0751\46usg\75AF=
QjCNGjqkkMP6ZG6SElmIVwVmkplfSr-g';return true;" onclick=3D"this.href=3D'htt=
p://www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php=
%3Fsrc%3Dexamples%2Fdo%2520while%25201.cpp\46sa\75D\46sntz\0751\46usg\75AFQ=
jCNGjqkkMP6ZG6SElmIVwVmkplfSr-g';return true;">Print arrays separating its =
elements</a><br><br><div style=3D"background-color:rgb(250,250,250);border-=
color:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-=
word"><code><div><span style=3D"color:#800">/* author: <a href=3D"http://nc=
omputers.org" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.goog=
le.com/url?q\75http%3A%2F%2Fncomputers.org\46sa\75D\46sntz\0751\46usg\75AFQ=
jCNGu9y3wXgJPa-68kCF9PEFnWBBJpQ';return true;" onclick=3D"this.href=3D'http=
://www.google.com/url?q\75http%3A%2F%2Fncomputers.org\46sa\75D\46sntz\0751\=
46usg\75AFQjCNGu9y3wXgJPa-68kCF9PEFnWBBJpQ';return true;">ncomputers.org</a=
> */</span><span style=3D"color:#000"><br>&nbsp;</span><span style=3D"color=
:#008">int</span><span style=3D"color:#000"> main</span><span style=3D"colo=
r:#660">(){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span=
><span style=3D"color:#008">unsigned</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#008">int</span><span style=3D"color:#000"> loop1</=
span><span style=3D"color:#660">=3D</span><span style=3D"color:#066">0</spa=
n><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; =
&nbsp; &nbsp;</span><span style=3D"color:#008">unsigned</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">int</span><span style=3D=
"color:#000"> loop2</span><span style=3D"color:#660">;</span><span style=3D=
"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=3D"color:#008">unsi=
gned</span><span style=3D"color:#000"> </span><span style=3D"color:#008">in=
t</span><span style=3D"color:#000"> result</span><span style=3D"color:#660"=
>=3D</span><span style=3D"color:#066">0</span><span style=3D"color:#660">;<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=
=3D"color:#008">unsigned</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#008">int</span><span style=3D"color:#000"> auxiliary1</span><s=
pan style=3D"color:#660">=3D</span><span style=3D"color:#066">1</span><span=
 style=3D"color:#660">,</span><span style=3D"color:#000">auxiliary2</span><=
span style=3D"color:#660">=3D</span><span style=3D"color:#066">2</span><spa=
n style=3D"color:#660">,</span><span style=3D"color:#000">auxi<wbr>liary3</=
span><span style=3D"color:#660">=3D</span><span style=3D"color:#066">3</spa=
n><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; =
&nbsp; &nbsp;</span><span style=3D"color:#008">while</span><span style=3D"c=
olor:#660">(</span><span style=3D"color:#000">loop1</span><span style=3D"co=
lor:#660">++&lt;</span><span style=3D"color:#066">1000000000</span><span st=
yle=3D"color:#660">){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp;</span><span style=3D"color:#800">/*<br>&nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp;* Allow initializers (extra improvement)<br>&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp;*/</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp;</span><span style=3D"color:#008">do</span><span style=
=3D"color:#660">(</span><span style=3D"color:#000">loop2</span><span style=
=3D"color:#660">=3D</span><span style=3D"color:#066">0</span><span style=3D=
"color:#660">){</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp;result</span><span style=3D"color:#660">+=3D</spa=
n><span style=3D"color:#000">auxiliary1</span><span style=3D"color:#660">;<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp;result</span><span style=3D"color:#660">-=3D</span><span style=3D=
"color:#000">auxiliary2</span><span style=3D"color:#660">;</span><span styl=
e=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result=
</span><span style=3D"color:#660">*=3D</span><span style=3D"color:#000">aux=
iliary3</span><span style=3D"color:#660">;</span><span style=3D"color:#000"=
><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#008">while</span><span style=3D"color:#660">(++=
</span><span style=3D"color:#000">loop2</span><span style=3D"color:#660">&l=
t;</span><span style=3D"color:#066">10</span><span style=3D"color:#660">){<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp;</span><span style=3D"color:#800">/*<br>&nbsp; &nbsp; &nbsp; &nbs=
p; &nbsp; &nbsp; &nbsp;* Statements that will happen after the execution of=
 each cycle<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* and only i=
f there is a next cycle.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
;*/</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp;auxiliary1</span><span style=3D"color:#660">+=3D</span><span =
style=3D"color:#000">auxiliary3</span><span style=3D"color:#660">;</span><s=
pan style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbs=
p;auxiliary2</span><span style=3D"color:#660">*=3D</span><span style=3D"col=
or:#000">auxiliary1</span><span style=3D"color:#660">;</span><span style=3D=
"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;auxiliary3=
</span><span style=3D"color:#660">-=3D</span><span style=3D"color:#000">aux=
iliary2</span><span style=3D"color:#660">;</span><span style=3D"color:#000"=
><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;</span><span style=
=3D"color:#660">}</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;=
</span><span style=3D"color:#008">return</span><span style=3D"color:#000"> =
</span><span style=3D"color:#066">0</span><span style=3D"color:#660">;</spa=
n><span style=3D"color:#000"><br>&nbsp;</span><span style=3D"color:#660">}<=
/span><span style=3D"color:#000"><br></span></div></code></div><br>Best reg=
ards,<br><br><a href=3D"http://ncomputers.org/content/code.php?src=3Dsugges=
tions/do%20while.cpp" target=3D"_blank" onmousedown=3D"this.href=3D'http://=
www.google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php%3Fs=
rc%3Dsuggestions%2Fdo%2520while.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNEfah=
GWYSkWCJPsOrRiKLqtk099Fg';return true;" onclick=3D"this.href=3D'http://www.=
google.com/url?q\75http%3A%2F%2Fncomputers.org%2Fcontent%2Fcode.php%3Fsrc%3=
Dsuggestions%2Fdo%2520while.cpp\46sa\75D\46sntz\0751\46usg\75AFQjCNEfahGWYS=
kWCJPsOrRiKLqtk099Fg';return true;">http://ncomputers.org</a><span><font co=
lor=3D"#888888"><br><br><br></font></span></div><span><font color=3D"#88888=
8">

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'javascript:';return true;" onclic=
k=3D"this.href=3D'javascript:';return true;">std-proposal...@<wbr>isocpp.or=
g</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"n2CxqqV_NhkJ" onmousedown=3D"this.href=3D'java=
script:';return true;" onclick=3D"this.href=3D'javascript:';return true;">s=
td-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" onmousedown=3D"this.href=3D'http://groups=
..google.com/a/isocpp.org/group/std-proposals/';return true;" onclick=3D"thi=
s.href=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';retur=
n true;">http://groups.google.com/a/<wbr>isocpp.org/group/std-<wbr>proposal=
s/</a>.<br>
</font></span></blockquote></div><br></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_451_1805029445.1413398643243--

.


Author: contact@ncomputers.org
Date: Wed, 15 Oct 2014 12:13:43 -0700 (PDT)
Raw View
------=_Part_459_733560756.1413400423489
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you very much for your time and your answer!

(note that there is no condition in the 'for').=20


Aah! Ok! Yes. The generated code is what we're looking for.

Please note that we suggest this improvement to avoid the usage of tricks=
=20
and jumps.

I think, that your trick is very good.

If you had two possible syntax, which would you use and why?

for(unsigned a=3D0,b;;){
    b=3D1;
    if(a)break;
    b=3D0;
}

do(unsigned a=3D0,b){
    b=3D1;
}while(a){
    b=3D0;
}

Best regards,

http://ncomputers.org=20

El mi=C3=A9rcoles, 15 de octubre de 2014 13:43:53 UTC-5, Matthew Woehlke=20
escribi=C3=B3:
>
> On 2014-10-15 14:26, con...@ncomputers.org <javascript:> wrote:=20
> > El mi=C3=A9rcoles, 15 de octubre de 2014 13:17:26 UTC-5, Matthew Woehlk=
e=20
> > escribi=C3=B3:=20
> >>   statement;=20
> >>   for (;;)=20
> >>   {=20
> >>     a;=20
> >>     if (!condition)=20
> >>       break;=20
> >>     b;=20
> >>   }=20
> >>=20
> >> Do I miss something?=20
> >=20
> > Break is a jump. if(!condition)break; and for(;condition;) is a double=
=20
> > check of the condition.=20
>
> So is 'while'; I don't see your point. The condition is checked only=20
> once in the above code (note that there is no condition in the 'for').=20
>
> The only advantage I see to your proposed syntax is the ability to=20
> declare a variable in the 'do' that is local to the loop. I doubt very=20
> much that a core language change would be accepted for so little benefit.=
=20
>
> --=20
> Matthew=20
>
>

--=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_459_733560756.1413400423489
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you very much for your time and your answer!<br><br>=
<blockquote style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(=
204, 204, 204); padding-left: 1ex;" class=3D"gmail_quote">(note that there =
is no condition in the 'for').
</blockquote><div><br>Aah! Ok! Yes. The generated code is what we're lookin=
g for.<br><br>Please note that we suggest this improvement to avoid the usa=
ge of tricks and jumps.<br><br>I think, that your trick is very good.<br><b=
r>If you had two possible syntax, which would you use and why?<br><br><div =
class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border=
-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wr=
ap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint">=
<span style=3D"color: #008;" class=3D"styled-by-prettify">for</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">unsigned</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #066;" clas=
s=3D"styled-by-prettify">0</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">b</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;;=
){</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbs=
p; &nbsp; b</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>=3D</span><span style=3D"color: #066;" class=3D"styled-by-prettify">1</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; </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">if</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">a</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">)</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">break</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br>&nbsp; &nbsp; b</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">=3D</span><span style=3D"color: #066;" class=3D"styled-b=
y-prettify">0</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br></span></div></co=
de></div><br><div class=3D"prettyprint" style=3D"background-color: rgb(250,=
 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-w=
idth: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">do</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">unsigned</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">b</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">){</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>&nbsp; &nbsp; b</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">=3D</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: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">while</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">a</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; b</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">0</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan></div></code></div><br>Best regards,<br><br><a href=3D"http://ncomputer=
s.org">http://ncomputers.org</a>&nbsp;<br></div><br>El mi=C3=A9rcoles, 15 d=
e octubre de 2014 13:43:53 UTC-5, Matthew Woehlke escribi=C3=B3:<blockquote=
 class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1=
px #ccc solid;padding-left: 1ex;">On 2014-10-15 14:26, <a href=3D"javascrip=
t:" target=3D"_blank" gdf-obfuscated-mailto=3D"pkZEWtgNZTgJ" onmousedown=3D=
"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript=
:';return true;">con...@ncomputers.org</a> wrote:
<br>&gt; El mi=C3=A9rcoles, 15 de octubre de 2014 13:17:26 UTC-5, Matthew W=
oehlke=20
<br>&gt; escribi=C3=B3:
<br>&gt;&gt; &nbsp; statement;=20
<br>&gt;&gt; &nbsp; for (;;)=20
<br>&gt;&gt; &nbsp; {=20
<br>&gt;&gt; &nbsp; &nbsp; a;=20
<br>&gt;&gt; &nbsp; &nbsp; if (!condition)=20
<br>&gt;&gt; &nbsp; &nbsp; &nbsp; break;=20
<br>&gt;&gt; &nbsp; &nbsp; b;=20
<br>&gt;&gt; &nbsp; }=20
<br>&gt;&gt;
<br>&gt;&gt; Do I miss something?=20
<br>&gt;
<br>&gt; Break is a jump. if(!condition)break; and for(;condition;) is a do=
uble=20
<br>&gt; check of the condition.
<br>
<br>So is 'while'; I don't see your point. The condition is checked only
<br>once in the above code (note that there is no condition in the 'for').
<br>
<br>The only advantage I see to your proposed syntax is the ability to
<br>declare a variable in the 'do' that is local to the loop. I doubt very
<br>much that a core language change would be accepted for so little benefi=
t.
<br>
<br>--=20
<br>Matthew
<br>
<br></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_459_733560756.1413400423489--

.


Author: Markus Grech <markus.grech@gmail.com>
Date: Wed, 15 Oct 2014 23:43:40 -0700 (PDT)
Raw View
------=_Part_6028_988729279.1413441821016
Content-Type: text/plain; charset=UTF-8

I have suggested the same idea in this thread:
https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA
Note that my suggestion is more general. You may want to look at the
discussion there.

--

---
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_6028_988729279.1413441821016
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have suggested the same idea in this thread:&nbsp;<a hre=
f=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1r=
pMw2dNwA">https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposal=
s/O1rpMw2dNwA</a><div>Note that my suggestion is more general. You may want=
 to look at the discussion there.</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_6028_988729279.1413441821016--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Thu, 16 Oct 2014 04:28:26 -0700 (PDT)
Raw View
------=_Part_5914_1384338589.1413458906288
Content-Type: text/plain; charset=UTF-8

One thing that seems to be overlooked is the similarity to:


 do (/*statement*/) {

/*A*/
} while (/*condition*/); {
/*B*/
}


(i.e. differing in just a semicolon), which is correctly legal, but has
quite different semantics.

--

---
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_5914_1384338589.1413458906288
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><DIV>One thing that seems to be overlooked is the similari=
ty to:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style=3D"BORDER-BOTTOM: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; B=
ACKGROUND-COLOR: #fafafa; WORD-WRAP: break-word; BORDER-TOP: #bbb 1px solid=
; BORDER-RIGHT: #bbb 1px solid" class=3Dprettyprint><CODE class=3Dprettypri=
nt>
<DIV class=3Dsubprettyprint><SPAN style=3D"COLOR: #008" class=3Dstyled-by-p=
rettify>do</SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prettify> </=
SPAN><SPAN style=3D"COLOR: #660" class=3Dstyled-by-prettify>(</SPAN><SPAN s=
tyle=3D"COLOR: #800" class=3Dstyled-by-prettify>/*statement*/</SPAN><SPAN s=
tyle=3D"COLOR: #660" class=3Dstyled-by-prettify>)</SPAN><SPAN style=3D"COLO=
R: #000" class=3Dstyled-by-prettify> </SPAN><SPAN style=3D"COLOR: #660" cla=
ss=3Dstyled-by-prettify>{</SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-=
by-prettify> &nbsp;<BR>&nbsp;&nbsp;<BR></SPAN><SPAN style=3D"COLOR: #800" c=
lass=3Dstyled-by-prettify>/*A*/</SPAN><SPAN style=3D"COLOR: #000" class=3Ds=
tyled-by-prettify> &nbsp;<BR></SPAN><SPAN style=3D"COLOR: #660" class=3Dsty=
led-by-prettify>}</SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prett=
ify> </SPAN><SPAN style=3D"COLOR: #008" class=3Dstyled-by-prettify>while</S=
PAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prettify> </SPAN><SPAN st=
yle=3D"COLOR: #660" class=3Dstyled-by-prettify>(</SPAN><SPAN style=3D"COLOR=
: #800" class=3Dstyled-by-prettify>/*condition*/</SPAN><SPAN style=3D"COLOR=
: #660" class=3Dstyled-by-prettify>);</SPAN><SPAN style=3D"COLOR: #000" cla=
ss=3Dstyled-by-prettify> </SPAN><SPAN style=3D"COLOR: #660" class=3Dstyled-=
by-prettify>{</SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prettify>=
 &nbsp;<BR></SPAN><SPAN style=3D"COLOR: #800" class=3Dstyled-by-prettify>/*=
B*/</SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prettify> &nbsp;<BR=
></SPAN><SPAN style=3D"COLOR: #660" class=3Dstyled-by-prettify>}</SPAN></DI=
V></CODE></DIV><BR>
<DIV>&nbsp;</DIV>
<DIV>(i.e. differing in just a semicolon), which is correctly legal, but ha=
s quite different semantics.</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_5914_1384338589.1413458906288--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Thu, 16 Oct 2014 11:22:20 -0400
Raw View
On 2014-10-16 07:28, Douglas Boffey wrote:
> One thing that seems to be overlooked is the similarity to:
>
>  do (/*statement*/) {
>
> /*A*/
> } while (/*condition*/); {
> /*B*/
> }
>
> (i.e. differing in just a semicolon), which is correctly legal, but has
> quite different semantics.

True, but one can also write:

  if (condition); {
    ...stuff...
  }

....right now, which is similarly perfectly legal and just as broken. (In
fact, I *did* this - by accident, of course - just a few days ago.) But
no one is proposing to somehow ban such a construct.

I'd consider the above a weak argument against. (I'm still opposed to
it, but more for other, previously mentioned reasons.)

--
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: contact@ncomputers.org
Date: Thu, 16 Oct 2014 09:37:40 -0700 (PDT)
Raw View
------=_Part_383_1736348383.1413477460458
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you for your time and your answer!

I don't understand exactly, which purpose does this syntax have?

#include<iostream>
using namespace std;

int main(){
    if(0);{
        cout<<"here"<<endl;
    }
}

Best regards,

ncomputers.org

El jueves, 16 de octubre de 2014 10:22:36 UTC-5, Matthew Woehlke escribi=C3=
=B3:
>
> On 2014-10-16 07:28, Douglas Boffey wrote:=20
> > One thing that seems to be overlooked is the similarity to:=20
> >  =20
> >  do (/*statement*/) {  =20
> >  =20
> > /*A*/  =20
> > } while (/*condition*/); {  =20
> > /*B*/  =20
> > }=20
> >  =20
> > (i.e. differing in just a semicolon), which is correctly legal, but has=
=20
> > quite different semantics.=20
>
> True, but one can also write:=20
>
>   if (condition); {=20
>     ...stuff...=20
>   }=20
>
> ...right now, which is similarly perfectly legal and just as broken. (In=
=20
> fact, I *did* this - by accident, of course - just a few days ago.) But=
=20
> no one is proposing to somehow ban such a construct.=20
>
> I'd consider the above a weak argument against. (I'm still opposed to=20
> it, but more for other, previously mentioned reasons.)=20
>
> --=20
> Matthew=20
>
>

--=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_383_1736348383.1413477460458
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you for your time and your answer!<br><br>I don't un=
derstand exactly, which purpose does this syntax have?<br><br><div class=3D=
"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: =
rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: brea=
k-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span st=
yle=3D"color: #800;" class=3D"styled-by-prettify">#include</span><span styl=
e=3D"color: #080;" class=3D"styled-by-prettify">&lt;iostream&gt;</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">using</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">namespace</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br><br></span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> main</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">(){</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">if</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><spa=
n 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; cout</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&l=
t;&lt;</span><span style=3D"color: #080;" class=3D"styled-by-prettify">"her=
e"</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify">endl</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">}</span></div></code></div><br>B=
est regards,<br><br><a href=3D"http://ncomputers.org">ncomputers.org</a><br=
><br>El jueves, 16 de octubre de 2014 10:22:36 UTC-5, Matthew Woehlke escri=
bi=C3=B3:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 2014-10-16 07:28, =
Douglas Boffey wrote:
<br>&gt; One thing that seems to be overlooked is the similarity to:
<br>&gt; &nbsp;
<br>&gt; &nbsp;do (/*statement*/) { &nbsp;
<br>&gt; &nbsp;=20
<br>&gt; /*A*/ &nbsp;
<br>&gt; } while (/*condition*/); { &nbsp;
<br>&gt; /*B*/ &nbsp;
<br>&gt; }
<br>&gt; &nbsp;
<br>&gt; (i.e. differing in just a semicolon), which is correctly legal, bu=
t has=20
<br>&gt; quite different semantics.
<br>
<br>True, but one can also write:
<br>
<br>&nbsp; if (condition); {
<br>&nbsp; &nbsp; ...stuff...
<br>&nbsp; }
<br>
<br>...right now, which is similarly perfectly legal and just as broken. (I=
n
<br>fact, I *did* this - by accident, of course - just a few days ago.) But
<br>no one is proposing to somehow ban such a construct.
<br>
<br>I'd consider the above a weak argument against. (I'm still opposed to
<br>it, but more for other, previously mentioned reasons.)
<br>
<br>--=20
<br>Matthew
<br>
<br></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_383_1736348383.1413477460458--

.


Author: contact@ncomputers.org
Date: Thu, 16 Oct 2014 09:44:59 -0700 (PDT)
Raw View
------=_Part_3087_2045440618.1413477899454
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you very much for your time and your answer!

We're now two, who proposes the same improvement!

I think, that the other two ideas are also good!

Best regards,

ncomputers.org

El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=B3=
:
>
> I have suggested the same idea in this thread:=20
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw=
2dNwA
> Note that my suggestion is more general. You may want to look at the=20
> discussion there.
>

--=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_3087_2045440618.1413477899454
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you very much for your time and your answer!<br><br>=
We're now two, who proposes the same improvement!<br><br>I think, that the =
other two ideas are also good!<br><br>Best regards,<br><br><a href=3D"http:=
//ncomputers.org">ncomputers.org</a><br><br>El jueves, 16 de octubre de 201=
4 01:43:41 UTC-5, Markus Grech escribi=C3=B3:<blockquote class=3D"gmail_quo=
te" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddi=
ng-left: 1ex;"><div dir=3D"ltr">I have suggested the same idea in this thre=
ad:&nbsp;<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/st=
d-proposals/O1rpMw2dNwA" target=3D"_blank" onmousedown=3D"this.href=3D'http=
s://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA'=
;return true;" onclick=3D"this.href=3D'https://groups.google.com/a/isocpp.o=
rg/forum/#!topic/std-proposals/O1rpMw2dNwA';return true;">https://groups.go=
ogle.<wbr>com/a/isocpp.org/forum/#!<wbr>topic/std-proposals/<wbr>O1rpMw2dNw=
A</a><div>Note that my suggestion is more general. You may want to look at =
the discussion there.</div></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_3087_2045440618.1413477899454--

.


Author: ziemowit.laski@gmail.com
Date: Fri, 19 Oct 2018 15:24:38 -0700 (PDT)
Raw View
------=_Part_3769_212620958.1539987878292
Content-Type: multipart/alternative;
 boundary="----=_Part_3770_2131475084.1539987878293"

------=_Part_3770_2131475084.1539987878293
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I'm late to the party (and maybe this has already made it in), but I'd also=
=20
like to see 'do(init) { ... } while(predicate);', to prevent 'init' scope=
=20
leakage. =20

Analogously, it would be good to have (if we don't have it yet) 'try(init)=
=20
{....} catch(blah) {...} catch(blaz) {....}', where the scope 'init'=20
extends to the last catch block.

--Zem

On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@ncomputers.org=20
wrote:
>
> Thank you very much for your time and your answer!
>
> We're now two, who proposes the same improvement!
>
> I think, that the other two ideas are also good!
>
> Best regards,
>
> ncomputers.org
>
> El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=
=B3:
>>
>> I have suggested the same idea in this thread:=20
>> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpM=
w2dNwA
>> Note that my suggestion is more general. You may want to look at the=20
>> discussion there.
>>
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.or=
g.

------=_Part_3770_2131475084.1539987878293
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;m late to the party (and maybe this has already made=
 it in), but I&#39;d also like to see &#39;do(init) { ... } while(predicate=
);&#39;, to prevent &#39;init&#39; scope leakage.=C2=A0=C2=A0<div><br></div=
><div>Analogously, it would be good to have (if we don&#39;t have it yet) &=
#39;try(init) {....} catch(blah) {...} catch(blaz) {....}&#39;, where the s=
cope &#39;init&#39; extends to the last catch block.</div><div><br></div><d=
iv>--Zem<br><br>On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@n=
computers.org wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr">Thank you very much for your time and your answer!<br><br>We&#39;r=
e now two, who proposes the same improvement!<br><br>I think, that the othe=
r two ideas are also good!<br><br>Best regards,<br><br><a href=3D"http://nc=
omputers.org" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=
=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fncomputers.org\x26sa\x3=
dD\x26sntz\x3d1\x26usg\x3dAFQjCNGu9y3wXgJPa-68kCF9PEFnWBBJpQ&#39;;return tr=
ue;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%=
2Fncomputers.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGu9y3wXgJPa-68kCF9=
PEFnWBBJpQ&#39;;return true;">ncomputers.org</a><br><br>El jueves, 16 de oc=
tubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=B3:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr">I have suggested the same idea in t=
his thread:=C2=A0<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!=
topic/std-proposals/O1rpMw2dNwA" target=3D"_blank" rel=3D"nofollow" onmouse=
down=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/forum/#!top=
ic/std-proposals/O1rpMw2dNwA&#39;;return true;" onclick=3D"this.href=3D&#39=
;https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2=
dNwA&#39;;return true;">https://groups.google.<wbr>com/a/isocpp.org/forum/#=
!<wbr>topic/std-proposals/<wbr>O1rpMw2dNwA</a><div>Note that my suggestion =
is more general. You may want to look at the discussion there.</div></div><=
/blockquote></div></blockquote></div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4=
%40isocpp.org</a>.<br />

------=_Part_3770_2131475084.1539987878293--

------=_Part_3769_212620958.1539987878292--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Mon, 22 Oct 2018 19:28:34 -0700
Raw View
--00000000000009a75d0578dc21cb
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 19 Oct 2018 at 15:24, <ziemowit.laski@gmail.com> wrote:

> I'm late to the party (and maybe this has already made it in), but I'd
> also like to see 'do(init) { ... } while(predicate);', to prevent 'init'
> scope leakage.
>

`do` does not have mandatory braces, so parsing that would be quite
challenging, and it would probably introduce lots of syntactic ambiguities.
For example:

int **p, **x;
void f() {
  do (int (**p) =3D x) (*p)[0] =3D 1; while (true);
}

.... would be ambiguous between declaring a variable named p in a
do-initializer and using it in the body, and a function-call expression
whose callee is (int (**p) =3D x) and whose argument is *p.


> Analogously, it would be good to have (if we don't have it yet) 'try(init=
)
> {....} catch(blah) {...} catch(blaz) {....}', where the scope 'init'
> extends to the last catch block.
>

This wouldn't be ambiguous, but is it useful? Do you have a concrete use
case for this?


> --Zem
>
> On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@ncomputers.org
> wrote:
>>
>> Thank you very much for your time and your answer!
>>
>> We're now two, who proposes the same improvement!
>>
>> I think, that the other two ideas are also good!
>>
>> Best regards,
>>
>> ncomputers.org
>>
>> El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=
=B3:
>>>
>>> I have suggested the same idea in this thread:
>>> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rp=
Mw2dNwA
>>> Note that my suggestion is more general. You may want to look at the
>>> discussion there.
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12f=
b-415c-b940-5c66c27dfeb4%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12=
fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9s=
SfA%40mail.gmail.com.

--00000000000009a75d0578dc21cb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 19 Oct=
 2018 at 15:24, &lt;<a href=3D"mailto:ziemowit.laski@gmail.com">ziemowit.la=
ski@gmail.com</a>&gt; wrote:<br></div><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">I&#39;m late to the party (and maybe this has already made it in=
), but I&#39;d also like to see &#39;do(init) { ... } while(predicate);&#39=
;, to prevent &#39;init&#39; scope leakage.=C2=A0=C2=A0</div></blockquote><=
div><br></div><div>`do` does not have mandatory braces, so parsing that wou=
ld be quite challenging, and it would probably introduce lots of syntactic =
ambiguities. For example:</div><div><br></div><div>int **p, **x;</div><div>=
void f() {</div><div>=C2=A0 do (int (**p) =3D x) (*p)[0] =3D 1; while (true=
);</div><div>}</div><div><br></div><div>... would be ambiguous between decl=
aring a variable named p in a do-initializer and using it in the body, and =
a function-call expression whose callee is (int (**p) =3D x) and whose argu=
ment is *p.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><div>Analogously, it would be good to have (if we don&#39;t have i=
t yet) &#39;try(init) {....} catch(blah) {...} catch(blaz) {....}&#39;, whe=
re the scope &#39;init&#39; extends to the last catch block.</div></div></b=
lockquote><div><br></div><div>This wouldn&#39;t be ambiguous, but is it use=
ful? Do you have a concrete use case for this?</div><div>=C2=A0</div><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div dir=3D"ltr"><div>--Zem<br><br>On Thursday, Oc=
tober 16, 2014 at 9:44:59 AM UTC-7, <a href=3D"mailto:con...@ncomputers.org=
" target=3D"_blank">con...@ncomputers.org</a> wrote:<blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr">Thank you very much for your time and you=
r answer!<br><br>We&#39;re now two, who proposes the same improvement!<br><=
br>I think, that the other two ideas are also good!<br><br>Best regards,<br=
><br><a href=3D"http://ncomputers.org" rel=3D"nofollow" target=3D"_blank">n=
computers.org</a><br><br>El jueves, 16 de octubre de 2014 01:43:41 UTC-5, M=
arkus Grech escribi=C3=B3:<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">I have suggested the same idea in this thread:=C2=A0<a href=3D"htt=
ps://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA=
" rel=3D"nofollow" target=3D"_blank">https://groups.google.com/a/isocpp.org=
/forum/#!topic/std-proposals/O1rpMw2dNwA</a><div>Note that my suggestion is=
 more general. You may want to look at the discussion there.</div></div></b=
lockquote></div></blockquote></div></div>

<p></p>

-- <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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-=
415c-b940-5c66c27dfeb4%40isocpp.org</a>.<br>
</blockquote></div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGD=
uPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVg=
DaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com</a>.<br />

--00000000000009a75d0578dc21cb--

.


Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Wed, 24 Oct 2018 12:27:21 -0400
Raw View
On 19/10/2018 18.24, ziemowit.laski@gmail.com wrote:
> I'm late to the party (and maybe this has already made it in), but I'd also
> like to see 'do(init) { ... } while(predicate);', to prevent 'init' scope
> leakage.
>
> Analogously, it would be good to have (if we don't have it yet) 'try(init)
> {....} catch(blah) {...} catch(blaz) {....}', where the scope 'init'
> extends to the last catch block.

If we only had a `with` statement, the value of all these additions
would be greatly reduced...

  #define with(decl) if(decl; true)

....except maybe for `if` ;-).

That said, one "nice" reason to consider a `with` as an actual language
extension is that it could (also) take a statement and lifetime-extend
its value:

  with (acquire{resource}) // not destroyed immediately

(AFAICT there is no way to write a single macro that can do both.)

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f7456077-2b5e-7dfe-3f8f-01e624c9e095%40gmail.com.

.


Author: <ziemowit.laski@gmail.com>
Date: Fri, 26 Oct 2018 10:29:53 -0700
Raw View
This is a multipart message in MIME format.

------=_NextPart_000_0069_01D46D16.D6102F40
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Good point about the introduced =E2=80=98do=E2=80=99 ambiguity.  Looking at=
 your example, I=E2=80=99m not even sure the ambiguity could be resolved _s=
emantically_.  Shame =E2=98=B9

=20

I introduced the try-catch idea merely for =E2=80=9Ccompleteness=E2=80=9D/o=
rthogonality (I=E2=80=99m not a heavy user of exceptions myself), but the i=
dea is as follows:  You acquire some value from somewhere and attempt to pe=
rform computation on it, but if something goes awry, you throw it for someo=
ne else to handle:

=20

try (MyObject val =3D some_acquired_value()) {

  do_something_useful_with(val);

}

catch ( OverflowException e) {

  throw(val);  // so someone else can do something useful with it

}

// but you don=E2=80=99t want val lying around here

=20

=20

From: Richard Smith <richard@metafoo.co.uk>=20
Sent: Monday, October 22, 2018 7:29 PM
To: std-proposals@isocpp.org
Cc: contact@ncomputers.org
Subject: Re: [std-proposals] Re: Do ... while structure improvement

=20

On Fri, 19 Oct 2018 at 15:24, <ziemowit.laski@gmail.com> wrote:

I'm late to the party (and maybe this has already made it in), but I'd also=
 like to see 'do(init) { ... } while(predicate);', to prevent 'init' scope =
leakage. =20

=20

`do` does not have mandatory braces, so parsing that would be quite challen=
ging, and it would probably introduce lots of syntactic ambiguities. For ex=
ample:

=20

int **p, **x;

void f() {

  do (int (**p) =3D x) (*p)[0] =3D 1; while (true);

}

=20

.... would be ambiguous between declaring a variable named p in a do-initial=
izer and using it in the body, and a function-call expression whose callee =
is (int (**p) =3D x) and whose argument is *p.

=20

Analogously, it would be good to have (if we don't have it yet) 'try(init) =
{....} catch(blah) {...} catch(blaz) {....}', where the scope 'init' extend=
s to the last catch block.

=20

This wouldn't be ambiguous, but is it useful? Do you have a concrete use ca=
se for this?

=20

--Zem

On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@ncomputers.org <m=
ailto:con...@ncomputers.org>  wrote:

Thank you very much for your time and your answer!

We're now two, who proposes the same improvement!

I think, that the other two ideas are also good!

Best regards,

ncomputers.org <http://ncomputers.org>=20

El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=B3=
:

I have suggested the same idea in this thread: https://groups.google.com/a/=
isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA

Note that my suggestion is more general. You may want to look at the discus=
sion there.

--=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 <mailto:std-proposals+unsubscr=
ibe@isocpp.org> .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.or=
g <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12=
fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er> .

--=20
You received this message because you are subscribed to a topic in the Goog=
le Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.or=
g/d/topic/std-proposals/i-0stW2WkXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to std-pro=
posals+unsubscribe@isocpp.org <mailto:std-proposals+unsubscribe@isocpp.org>=
 .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9s=
SfA%40mail.gmail.com <https://groups.google.com/a/isocpp.org/d/msgid/std-pr=
oposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.co=
m?utm_medium=3Demail&utm_source=3Dfooter> .

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f710%24%40gmail.co=
m.

------=_NextPart_000_0069_01D46D16.D6102F40
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dutf-8"><meta name=3DGenerator content=3D"Microsoft=
 Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
 {font-family:"Cambria Math";
 panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
 {mso-style-name:msonormal;
 mso-margin-top-alt:auto;
 margin-right:0in;
 mso-margin-bottom-alt:auto;
 margin-left:0in;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
span.EmailStyle18
 {mso-style-type:personal-reply;
 font-family:"Calibri",sans-serif;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-size:10.0pt;
 font-family:"Calibri",sans-serif;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Good point about=
 the introduced =E2=80=98do=E2=80=99 ambiguity.=C2=A0 Looking at your examp=
le, I=E2=80=99m not even sure the ambiguity could be resolved _<i>semantica=
lly</i>_.=C2=A0 Shame <span style=3D'font-family:"Segoe UI Emoji",sans-seri=
f'>=E2=98=B9</span><o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p=
><p class=3DMsoNormal>I introduced the try-catch idea merely for =E2=80=9Cc=
ompleteness=E2=80=9D/orthogonality (I=E2=80=99m not a heavy user of excepti=
ons myself), but the idea is as follows:=C2=A0 You acquire some value from =
somewhere and attempt to perform computation on it, but if something goes a=
wry, you throw it for someone else to handle:<o:p></o:p></p><p class=3DMsoN=
ormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>try (MyObject val =3D some_=
acquired_value()) {<o:p></o:p></p><p class=3DMsoNormal>=C2=A0 do_something_=
useful_with(val);<o:p></o:p></p><p class=3DMsoNormal>}<o:p></o:p></p><p cla=
ss=3DMsoNormal>catch ( OverflowException e) {<o:p></o:p></p><p class=3DMsoN=
ormal>=C2=A0 throw(val);=C2=A0 // so someone else can do something useful w=
ith it<o:p></o:p></p><p class=3DMsoNormal>}<o:p></o:p></p><p class=3DMsoNor=
mal>// but you don=E2=80=99t want val lying around here<o:p></o:p></p><p cl=
ass=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p>=
</p><p class=3DMsoNormal style=3D'margin-left:.5in'><b>From:</b> Richard Sm=
ith &lt;richard@metafoo.co.uk&gt; <br><b>Sent:</b> Monday, October 22, 2018=
 7:29 PM<br><b>To:</b> std-proposals@isocpp.org<br><b>Cc:</b> contact@ncomp=
uters.org<br><b>Subject:</b> Re: [std-proposals] Re: Do ... while structure=
 improvement<o:p></o:p></p><p class=3DMsoNormal style=3D'margin-left:.5in'>=
<o:p>&nbsp;</o:p></p><div><div><div><p class=3DMsoNormal style=3D'margin-le=
ft:.5in'>On Fri, 19 Oct 2018 at 15:24, &lt;<a href=3D"mailto:ziemowit.laski=
@gmail.com">ziemowit.laski@gmail.com</a>&gt; wrote:<o:p></o:p></p></div><bl=
ockquote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0=
in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bot=
tom:5.0pt'><div><p class=3DMsoNormal style=3D'margin-left:.5in'>I'm late to=
 the party (and maybe this has already made it in), but I'd also like to se=
e 'do(init) { ... } while(predicate);', to prevent 'init' scope leakage.&nb=
sp;&nbsp;<o:p></o:p></p></div></blockquote><div><p class=3DMsoNormal style=
=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal =
style=3D'margin-left:.5in'>`do` does not have mandatory braces, so parsing =
that would be quite challenging, and it would probably introduce lots of sy=
ntactic ambiguities. For example:<o:p></o:p></p></div><div><p class=3DMsoNo=
rmal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3D=
MsoNormal style=3D'margin-left:.5in'>int **p, **x;<o:p></o:p></p></div><div=
><p class=3DMsoNormal style=3D'margin-left:.5in'>void f() {<o:p></o:p></p><=
/div><div><p class=3DMsoNormal style=3D'margin-left:.5in'>&nbsp; do (int (*=
*p) =3D x) (*p)[0] =3D 1; while (true);<o:p></o:p></p></div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'>}<o:p></o:p></p></div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal style=3D'margin-left:.5in'>... would be ambiguous between=
 declaring a variable named p in a do-initializer and using it in the body,=
 and a function-call expression whose callee is (int (**p) =3D x) and whose=
 argument is *p.<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mar=
gin-left:.5in'>&nbsp;<o:p></o:p></p></div><blockquote style=3D'border:none;=
border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt=
;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'>Analogously, it would be good to ha=
ve (if we don't have it yet) 'try(init) {....} catch(blah) {...} catch(blaz=
) {....}', where the scope 'init' extends to the last catch block.<o:p></o:=
p></p></div></div></blockquote><div><p class=3DMsoNormal style=3D'margin-le=
ft:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D'marg=
in-left:.5in'>This wouldn't be ambiguous, but is it useful? Do you have a c=
oncrete use case for this?<o:p></o:p></p></div><div><p class=3DMsoNormal st=
yle=3D'margin-left:.5in'>&nbsp;<o:p></o:p></p></div><blockquote style=3D'bo=
rder:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-=
left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div=
><p class=3DMsoNormal style=3D'margin-left:.5in'>--Zem<br><br>On Thursday, =
October 16, 2014 at 9:44:59 AM UTC-7, <a href=3D"mailto:con...@ncomputers.o=
rg" target=3D"_blank">con...@ncomputers.org</a> wrote:<o:p></o:p></p><block=
quote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in =
0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom=
:5.0pt'><div><p class=3DMsoNormal style=3D'margin-left:.5in'>Thank you very=
 much for your time and your answer!<br><br>We're now two, who proposes the=
 same improvement!<br><br>I think, that the other two ideas are also good!<=
br><br>Best regards,<br><br><a href=3D"http://ncomputers.org" target=3D"_bl=
ank">ncomputers.org</a><br><br>El jueves, 16 de octubre de 2014 01:43:41 UT=
C-5, Markus Grech escribi=C3=B3:<o:p></o:p></p><blockquote style=3D'border:=
none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:=
4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'>I have suggested the same idea in t=
his thread:&nbsp;<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!=
topic/std-proposals/O1rpMw2dNwA" target=3D"_blank">https://groups.google.co=
m/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA</a><o:p></o:p></p><d=
iv><p class=3DMsoNormal style=3D'margin-left:.5in'>Note that my suggestion =
is more general. You may want to look at the discussion there.<o:p></o:p></=
p></div></div></blockquote></div></blockquote></div></div><p class=3DMsoNor=
mal style=3D'margin-left:.5in'>-- <br>You received this message because you=
 are subscribed to the Google Groups &quot;ISO C++ Standard - Future Propos=
als&quot; group.<br>To unsubscribe from this group and stop receiving email=
s from it, send an email to <a href=3D"mailto:std-proposals+unsubscribe@iso=
cpp.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.or=
g" target=3D"_blank">std-proposals@isocpp.org</a>.<br>To view this discussi=
on on the web visit <a href=3D"https://groups.google.com/a/isocpp.org/d/msg=
id/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medi=
um=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">https://groups.google=
..com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb=
4%40isocpp.org</a>.<o:p></o:p></p></blockquote></div></div><p class=3DMsoNo=
rmal style=3D'margin-left:.5in'>-- <br>You received this message because yo=
u are subscribed to a topic in the Google Groups &quot;ISO C++ Standard - F=
uture Proposals&quot; group.<br>To unsubscribe from this topic, visit <a hr=
ef=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposals/i-0stW2W=
kXs/unsubscribe">https://groups.google.com/a/isocpp.org/d/topic/std-proposa=
ls/i-0stW2WkXs/unsubscribe</a>.<br>To unsubscribe from this group and all i=
ts topics, send an email to <a href=3D"mailto:std-proposals+unsubscribe@iso=
cpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br>To post to this group=
, send email to <a href=3D"mailto:std-proposals@isocpp.org">std-proposals@i=
socpp.org</a>.<br>To view this discussion on the web visit <a href=3D"https=
://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDa=
OQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3Demail&amp;ut=
m_source=3Dfooter">https://groups.google.com/a/isocpp.org/d/msgid/std-propo=
sals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com</=
a>.<o:p></o:p></p></div></body></html>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f710%24=
%40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f710%2=
4%40gmail.com</a>.<br />

------=_NextPart_000_0069_01D46D16.D6102F40--


.


Author: "'ncomputers.org' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sat, 27 Oct 2018 15:17:45 -0500
Raw View
This is a multi-part message in MIME format.
--------------BE04F21D44648F355F5C565F
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi,

Thank you very much for taking a look to this some years after it was=20
written.

I have been making an effort for keeping the original idea alive here:=20
https://ncomputers.org/dowhile

I will reply more later.

Example of ASM code:

do(int rax=3D0){//block A}

while(rax!=3D100){//block B}

............

mov $0,%rax

do:

#block A

cmp %rax,$100

je end

#block B

jmp do

end:

............

Best regards,

Oliver

Am 26.10.2018 um 12:29 schrieb ziemowit.laski@gmail.com:
>
> Good point about the introduced =E2=80=98do=E2=80=99 ambiguity.=C2=A0 Loo=
king at your=20
> example, I=E2=80=99m not even sure the ambiguity could be resolved=20
> _/semantically/_.=C2=A0 Shame =E2=98=B9
>
> I introduced the try-catch idea merely for=20
> =E2=80=9Ccompleteness=E2=80=9D/orthogonality (I=E2=80=99m not a heavy use=
r of exceptions=20
> myself), but the idea is as follows:=C2=A0 You acquire some value from=20
> somewhere and attempt to perform computation on it, but if something=20
> goes awry, you throw it for someone else to handle:
>
> try (MyObject val =3D some_acquired_value()) {
>
> =C2=A0 do_something_useful_with(val);
>
> }
>
> catch ( OverflowException e) {
>
> =C2=A0 throw(val);=C2=A0 // so someone else can do something useful with =
it
>
> }
>
> // but you don=E2=80=99t want val lying around here
>
> *From:* Richard Smith <richard@metafoo.co.uk>
> *Sent:* Monday, October 22, 2018 7:29 PM
> *To:* std-proposals@isocpp.org
> *Cc:* contact@ncomputers.org
> *Subject:* Re: [std-proposals] Re: Do ... while structure improvement
>
> On Fri, 19 Oct 2018 at 15:24, <ziemowit.laski@gmail.com=20
> <mailto:ziemowit.laski@gmail.com>> wrote:
>
>     I'm late to the party (and maybe this has already made it in), but
>     I'd also like to see 'do(init) { ... } while(predicate);', to
>     prevent 'init' scope leakage.
>
> `do` does not have mandatory braces, so parsing that would be quite=20
> challenging, and it would probably introduce lots of syntactic=20
> ambiguities. For example:
>
> int **p, **x;
>
> void f() {
>
> =C2=A0 do (int (**p) =3D x) (*p)[0] =3D 1; while (true);
>
> }
>
> ... would be ambiguous between declaring a variable named p in a=20
> do-initializer and using it in the body, and a function-call=20
> expression whose callee is (int (**p) =3D x) and whose argument is *p.
>
>     Analogously, it would be good to have (if we don't have it yet)
>     'try(init) {....} catch(blah) {...} catch(blaz) {....}', where the
>     scope 'init' extends to the last catch block.
>
> This wouldn't be ambiguous, but is it useful? Do you have a concrete=20
> use case for this?
>
>     --Zem
>
>     On Thursday, October 16, 2014 at 9:44:59 AM UTC-7,
>     con...@ncomputers.org <mailto:con...@ncomputers.org> wrote:
>
>         Thank you very much for your time and your answer!
>
>         We're now two, who proposes the same improvement!
>
>         I think, that the other two ideas are also good!
>
>         Best regards,
>
>         ncomputers.org <http://ncomputers.org>
>
>         El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech
>         escribi=C3=B3:
>
>             I have suggested the same idea in this thread:
>             https://groups.google.com/a/isocpp.org/forum/#!topic/std-prop=
osals/O1rpMw2dNwA
>             <https://groups.google.com/a/isocpp.org/forum/#%21topic/std-p=
roposals/O1rpMw2dNwA>
>
>             Note that my suggestion is more general. You may want to
>             look at the discussion there.
>
>     --=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 email to std-proposals+unsubscribe@isocpp.org
>     <mailto:std-proposals+unsubscribe@isocpp.org>.
>     To post to this group, send email to std-proposals@isocpp.org
>     <mailto:std-proposals@isocpp.org>.
>     To view this discussion on the web visit
>     https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec=
-12fb-415c-b940-5c66c27dfeb4%40isocpp.org
>     <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6e=
c-12fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>.
>
> --=20
> You received this message because you are subscribed to a topic in the=20
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit=20
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/i-0stW2WkXs/=
unsubscribe.
> To unsubscribe from this group and all its topics, send an email to=20
> std-proposals+unsubscribe@isocpp.org=20
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org=20
> <mailto:std-proposals@isocpp.org>.
> To view this discussion on the web visit=20
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWD=
cUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com=20
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eW=
DcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3Demai=
l&utm_source=3Dfooter>.
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/851c920e-cb9b-405c-1154-bc136f1f501b%40ncomputer=
s.org.

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

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <p>Hi,</p>
    <p>Thank you very much for taking a look to this some years after it
      was written.<br>
    </p>
    <p>I have been making an effort for keeping the original idea alive
      here: <a class=3D"moz-txt-link-freetext" href=3D"https://ncomputers.o=
rg/dowhile">https://ncomputers.org/dowhile</a></p>
    <p>I will reply more later.<br>
    </p>
    <p>Example of ASM code:</p>
    <p>do(int rax=3D0){//block A}</p>
    <p>while(rax!=3D100){//block B}</p>
    <p>...........</p>
    <p>mov $0,%rax<br>
    </p>
    <p>do:</p>
    <p>#block A</p>
    <p>cmp %rax,$100</p>
    <p>je end</p>
    <p>#block B</p>
    <p>jmp do<br>
    </p>
    <p>end:</p>
    <p>...........</p>
    <p>Best regards,</p>
    <p>Oliver<br>
    </p>
    Am 26.10.2018 um 12:29 schrieb <a class=3D"moz-txt-link-abbreviated" hr=
ef=3D"mailto:ziemowit.laski@gmail.com">ziemowit.laski@gmail.com</a>:<br>
    <blockquote type=3D"cite"
      cite=3D"mid:006801d46d51$826da7b0$8748f710$@gmail.com">
      <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf=
-8">
      <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
 {font-family:"Cambria Math";
 panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
 {mso-style-name:msonormal;
 mso-margin-top-alt:auto;
 margin-right:0in;
 mso-margin-bottom-alt:auto;
 margin-left:0in;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
span.EmailStyle18
 {mso-style-type:personal-reply;
 font-family:"Calibri",sans-serif;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-size:10.0pt;
 font-family:"Calibri",sans-serif;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
      <div class=3D"WordSection1">
        <p class=3D"MsoNormal">Good point about the introduced =E2=80=98do=
=E2=80=99
          ambiguity.=C2=A0 Looking at your example, I=E2=80=99m not even su=
re the
          ambiguity could be resolved _<i>semantically</i>_.=C2=A0 Shame <s=
pan
            style=3D"font-family:&quot;Segoe UI Emoji&quot;,sans-serif">=E2=
=98=B9</span><o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p>
        <p class=3D"MsoNormal">I introduced the try-catch idea merely for
          =E2=80=9Ccompleteness=E2=80=9D/orthogonality (I=E2=80=99m not a h=
eavy user of
          exceptions myself), but the idea is as follows:=C2=A0 You acquire
          some value from somewhere and attempt to perform computation
          on it, but if something goes awry, you throw it for someone
          else to handle:<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p>
        <p class=3D"MsoNormal">try (MyObject val =3D some_acquired_value())
          {<o:p></o:p></p>
        <p class=3D"MsoNormal">=C2=A0 do_something_useful_with(val);<o:p></=
o:p></p>
        <p class=3D"MsoNormal">}<o:p></o:p></p>
        <p class=3D"MsoNormal">catch ( OverflowException e) {<o:p></o:p></p=
>
        <p class=3D"MsoNormal">=C2=A0 throw(val);=C2=A0 // so someone else =
can do
          something useful with it<o:p></o:p></p>
        <p class=3D"MsoNormal">}<o:p></o:p></p>
        <p class=3D"MsoNormal">// but you don=E2=80=99t want val lying arou=
nd here<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p>
        <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p>
        <p class=3D"MsoNormal" style=3D"margin-left:.5in"><b>From:</b>
          Richard Smith <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:r=
ichard@metafoo.co.uk">&lt;richard@metafoo.co.uk&gt;</a> <br>
          <b>Sent:</b> Monday, October 22, 2018 7:29 PM<br>
          <b>To:</b> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:s=
td-proposals@isocpp.org">std-proposals@isocpp.org</a><br>
          <b>Cc:</b> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:c=
ontact@ncomputers.org">contact@ncomputers.org</a><br>
          <b>Subject:</b> Re: [std-proposals] Re: Do ... while structure
          improvement<o:p></o:p></p>
        <p class=3D"MsoNormal" style=3D"margin-left:.5in"><o:p>=C2=A0</o:p>=
</p>
        <div>
          <div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">On Fri, 19
                Oct 2018 at 15:24, &lt;<a
                  href=3D"mailto:ziemowit.laski@gmail.com"
                  moz-do-not-send=3D"true">ziemowit.laski@gmail.com</a>&gt;
                wrote:<o:p></o:p></p>
            </div>
            <blockquote style=3D"border:none;border-left:solid #CCCCCC
              1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0=
pt">
              <div>
                <p class=3D"MsoNormal" style=3D"margin-left:.5in">I'm late
                  to the party (and maybe this has already made it in),
                  but I'd also like to see 'do(init) { ... }
                  while(predicate);', to prevent 'init' scope leakage.=C2=
=A0=C2=A0<o:p></o:p></p>
              </div>
            </blockquote>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in"><o:p>=C2=A0=
</o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">`do` does
                not have mandatory braces, so parsing that would be
                quite challenging, and it would probably introduce lots
                of syntactic ambiguities. For example:<o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in"><o:p>=C2=A0=
</o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">int **p,
                **x;<o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">void f() {<=
o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">=C2=A0 do (=
int
                (**p) =3D x) (*p)[0] =3D 1; while (true);<o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">}<o:p></o:p=
></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in"><o:p>=C2=A0=
</o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">... would b=
e
                ambiguous between declaring a variable named p in a
                do-initializer and using it in the body, and a
                function-call expression whose callee is (int (**p) =3D x)
                and whose argument is *p.<o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">=C2=A0<o:p>=
</o:p></p>
            </div>
            <blockquote style=3D"border:none;border-left:solid #CCCCCC
              1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0=
pt">
              <div>
                <div>
                  <p class=3D"MsoNormal" style=3D"margin-left:.5in">Analogo=
usly,
                    it would be good to have (if we don't have it yet)
                    'try(init) {....} catch(blah) {...} catch(blaz)
                    {....}', where the scope 'init' extends to the last
                    catch block.<o:p></o:p></p>
                </div>
              </div>
            </blockquote>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in"><o:p>=C2=A0=
</o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">This
                wouldn't be ambiguous, but is it useful? Do you have a
                concrete use case for this?<o:p></o:p></p>
            </div>
            <div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">=C2=A0<o:p>=
</o:p></p>
            </div>
            <blockquote style=3D"border:none;border-left:solid #CCCCCC
              1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0=
pt">
              <div>
                <div>
                  <p class=3D"MsoNormal" style=3D"margin-left:.5in">--Zem<b=
r>
                    <br>
                    On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, <a
                      href=3D"mailto:con...@ncomputers.org"
                      target=3D"_blank" moz-do-not-send=3D"true">con...@nco=
mputers.org</a>
                    wrote:<o:p></o:p></p>
                  <blockquote style=3D"border:none;border-left:solid
                    #CCCCCC 1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0=
pt">
                    <div>
                      <p class=3D"MsoNormal" style=3D"margin-left:.5in">Tha=
nk
                        you very much for your time and your answer!<br>
                        <br>
                        We're now two, who proposes the same
                        improvement!<br>
                        <br>
                        I think, that the other two ideas are also good!<br=
>
                        <br>
                        Best regards,<br>
                        <br>
                        <a href=3D"http://ncomputers.org" target=3D"_blank"
                          moz-do-not-send=3D"true">ncomputers.org</a><br>
                        <br>
                        El jueves, 16 de octubre de 2014 01:43:41 UTC-5,
                        Markus Grech escribi=C3=B3:<o:p></o:p></p>
                      <blockquote style=3D"border:none;border-left:solid
                        #CCCCCC 1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0=
pt">
                        <div>
                          <p class=3D"MsoNormal" style=3D"margin-left:.5in"=
>I
                            have suggested the same idea in this
                            thread:=C2=A0<a
href=3D"https://groups.google.com/a/isocpp.org/forum/#%21topic/std-proposal=
s/O1rpMw2dNwA"
                              target=3D"_blank" moz-do-not-send=3D"true">ht=
tps://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNw=
A</a><o:p></o:p></p>
                          <div>
                            <p class=3D"MsoNormal"
                              style=3D"margin-left:.5in">Note that my
                              suggestion is more general. You may want
                              to look at the discussion there.<o:p></o:p></=
p>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                  </blockquote>
                </div>
              </div>
              <p class=3D"MsoNormal" style=3D"margin-left:.5in">-- <br>
                You received this message because you are subscribed to
                the Google Groups "ISO C++ Standard - Future Proposals"
                group.<br>
                To unsubscribe from this group and stop receiving emails
                from it, send an email to <a
                  href=3D"mailto:std-proposals+unsubscribe@isocpp.org"
                  target=3D"_blank" moz-do-not-send=3D"true">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=
"
                  moz-do-not-send=3D"true">std-proposals@isocpp.org</a>.<br=
>
                To view this discussion on the web visit <a
href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6=
ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&amp;utm_sour=
ce=3Dfooter"
                  target=3D"_blank" moz-do-not-send=3D"true">https://groups=
..google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66=
c27dfeb4%40isocpp.org</a>.<o:p></o:p></p>
            </blockquote>
          </div>
        </div>
        <p class=3D"MsoNormal" style=3D"margin-left:.5in">-- <br>
          You received this message because you are subscribed to a
          topic in the Google Groups "ISO C++ Standard - Future
          Proposals" group.<br>
          To unsubscribe from this topic, visit <a
href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposals/i-0stW=
2WkXs/unsubscribe"
            moz-do-not-send=3D"true">https://groups.google.com/a/isocpp.org=
/d/topic/std-proposals/i-0stW2WkXs/unsubscribe</a>.<br>
          To unsubscribe from this group and all its topics, send an
          email to <a
            href=3D"mailto:std-proposals+unsubscribe@isocpp.org"
            moz-do-not-send=3D"true">std-proposals+unsubscribe@isocpp.org</=
a>.<br>
          To post to this group, send email to <a
            href=3D"mailto:std-proposals@isocpp.org"
            moz-do-not-send=3D"true">std-proposals@isocpp.org</a>.<br>
          To view this discussion on the web visit <a
href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQ=
qm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=
=3Demail&amp;utm_source=3Dfooter"
            moz-do-not-send=3D"true">https://groups.google.com/a/isocpp.org=
/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%=
40mail.gmail.com</a>.<o:p></o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/851c920e-cb9b-405c-1154-bc136f1f501b%=
40ncomputers.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/851c920e-cb9b-405c-1154-bc136f1f=
501b%40ncomputers.org</a>.<br />

--------------BE04F21D44648F355F5C565F--

.


Author: Richard Hodges <hodges.r@gmail.com>
Date: Sun, 28 Oct 2018 09:33:24 +0100
Raw View
--000000000000fd0ffc057945ceed
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 26 Oct 2018 at 19:29, <ziemowit.laski@gmail.com> wrote:

> Good point about the introduced =E2=80=98do=E2=80=99 ambiguity.  Looking =
at your example,
> I=E2=80=99m not even sure the ambiguity could be resolved _*semantically*=
_.
> Shame =E2=98=B9
>
>
>
> I introduced the try-catch idea merely for =E2=80=9Ccompleteness=E2=80=9D=
/orthogonality
> (I=E2=80=99m not a heavy user of exceptions myself), but the idea is as f=
ollows:
> You acquire some value from somewhere and attempt to perform computation =
on
> it, but if something goes awry, you throw it for someone else to handle:
>
>
>
> try (MyObject val =3D some_acquired_value()) {
>
>   do_something_useful_with(val);
>
> }
>
> catch ( OverflowException e) {
>
>   throw(val);  // so someone else can do something useful with it
>
> }
>
> // but you don=E2=80=99t want val lying around here
>

This is an interesting case, because for me one of the most annoying things
about c++'s try blocks is that the variables *don't* escape the braces.
What I mean to say is that very often you do want at least one of the
variables "lying around here" :)

consider this impossible case:

NotDefaultConstructible x;  // illegal
try
{
  x =3D NotDefaultConstructible::construct_may_throw(...);
  x.something_that_may_throw();
  y =3D x.some_property();
}
catch(...)
{
 x =3D NotDefaultConstructible::recovery_mode();
}

// now use x;

We currently cannot write this - we are forced to hold x in an optional or
unique_ptr - which while solving the language expression problem, has
nothing to do with the intent of the algorithm - x is simply not logically
optional in this case.

The answer of course is to wrap the operations involving x into a few
smaller functions. But sometimes we don't want to. Essentially we're forced
into something like this:

auto make_x =3D [&y] {
  try {
    x =3D NotDefaultConstructible::construct_may_throw(...);
    x.something_that_may_throw();
    y =3D x.some_property();
    return x;
  }
  catch(...) {
    return  NotDefaultConstructible::recovery_mode();
  }
};

auto x =3D make_x();

// use x

I think there are (at least) two opposing arguments here:

1. Obviously you should be forced to express this code in a function
because the more single-responsibility functions you have the less
complexity you have.
2. This action is so trivial that I don't want to be forced to express it
through an artificial function.




>
>
>
>
> *From:* Richard Smith <richard@metafoo.co.uk>
> *Sent:* Monday, October 22, 2018 7:29 PM
> *To:* std-proposals@isocpp.org
> *Cc:* contact@ncomputers.org
> *Subject:* Re: [std-proposals] Re: Do ... while structure improvement
>
>
>
> On Fri, 19 Oct 2018 at 15:24, <ziemowit.laski@gmail.com> wrote:
>
> I'm late to the party (and maybe this has already made it in), but I'd
> also like to see 'do(init) { ... } while(predicate);', to prevent 'init'
> scope leakage.
>
>
>
> `do` does not have mandatory braces, so parsing that would be quite
> challenging, and it would probably introduce lots of syntactic ambiguitie=
s.
> For example:
>
>
>
> int **p, **x;
>
> void f() {
>
>   do (int (**p) =3D x) (*p)[0] =3D 1; while (true);
>
> }
>
>
>
> ... would be ambiguous between declaring a variable named p in a
> do-initializer and using it in the body, and a function-call expression
> whose callee is (int (**p) =3D x) and whose argument is *p.
>
>
>
> Analogously, it would be good to have (if we don't have it yet) 'try(init=
)
> {....} catch(blah) {...} catch(blaz) {....}', where the scope 'init'
> extends to the last catch block.
>
>
>
> This wouldn't be ambiguous, but is it useful? Do you have a concrete use
> case for this?
>
>
>
> --Zem
>
> On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@ncomputers.org
> wrote:
>
> Thank you very much for your time and your answer!
>
> We're now two, who proposes the same improvement!
>
> I think, that the other two ideas are also good!
>
> Best regards,
>
> ncomputers.org
>
> El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=
=B3:
>
> I have suggested the same idea in this thread:
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw=
2dNwA
>
> Note that my suggestion is more general. You may want to look at the
> discussion there.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12f=
b-415c-b940-5c66c27dfeb4%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12=
fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
> --
> 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/i-0stW2WkXs/=
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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWD=
cUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eW=
DcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3Demai=
l&utm_source=3Dfooter>
> .
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/006801d46d51=
%24826da7b0%248748f710%24%40gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/006801d46d5=
1%24826da7b0%248748f710%24%40gmail.com?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>


--=20
Richard Hodges
hodges.r@gmail.com
office: +442032898513
home: +376841522
mobile: +376380212 (this will be *expensive* outside Andorra!)
skype: madmongo
facebook: hodges.r

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CALvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2s=
Wnw%40mail.gmail.com.

--000000000000fd0ffc057945ceed
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 26 Oct 2018 at 19:29, &lt;<a href=3D"mailto:ziemowit.laski@gmail.com">zie=
mowit.laski@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div lang=3D"EN-US" link=3D"blue" vlink=3D"purple"><div class=3D"m_207162=
4510518854165WordSection1"><p class=3D"MsoNormal">Good point about the intr=
oduced =E2=80=98do=E2=80=99 ambiguity.=C2=A0 Looking at your example, I=E2=
=80=99m not even sure the ambiguity could be resolved _<i>semantically</i>_=
..=C2=A0 Shame <span style=3D"font-family:&quot;Segoe UI Emoji&quot;,sans-se=
rif">=E2=98=B9</span><u></u><u></u></p><p class=3D"MsoNormal"><u></u>=C2=A0=
<u></u></p><p class=3D"MsoNormal">I introduced the try-catch idea merely fo=
r =E2=80=9Ccompleteness=E2=80=9D/orthogonality (I=E2=80=99m not a heavy use=
r of exceptions myself), but the idea is as follows:=C2=A0 You acquire some=
 value from somewhere and attempt to perform computation on it, but if some=
thing goes awry, you throw it for someone else to handle:<u></u><u></u></p>=
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><p class=3D"MsoNormal">try (=
MyObject val =3D some_acquired_value()) {<u></u><u></u></p><p class=3D"MsoN=
ormal">=C2=A0 do_something_useful_with(val);<u></u><u></u></p><p class=3D"M=
soNormal">}<u></u><u></u></p><p class=3D"MsoNormal">catch ( OverflowExcepti=
on e) {<u></u><u></u></p><p class=3D"MsoNormal">=C2=A0 throw(val);=C2=A0 //=
 so someone else can do something useful with it<u></u><u></u></p><p class=
=3D"MsoNormal">}<u></u><u></u></p><p class=3D"MsoNormal">// but you don=E2=
=80=99t want val lying around here</p></div></div></blockquote><div><br></d=
iv><div>This is an interesting case, because for me one of the most annoyin=
g things about c++&#39;s try blocks is that the variables <i>don&#39;t</i> =
escape the braces. What I mean to say is that very often you do want at lea=
st one of the variables &quot;lying around here&quot; :)</div><div><br></di=
v><div>consider this impossible case:</div><div><br></div><div><font face=
=3D"monospace, monospace">NotDefaultConstructible x;=C2=A0 // illegal</font=
></div><div><font face=3D"monospace, monospace">try</font></div><div><font =
face=3D"monospace, monospace">{</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 x =3D NotDefaultConstructible::construct_may_throw(...);</=
font></div><div><font face=3D"monospace, monospace">=C2=A0 x.something_that=
_may_throw();</font></div><div><font face=3D"monospace, monospace">=C2=A0 y=
 =3D x.some_property();</font></div><div><font face=3D"monospace, monospace=
">}</font></div><div><font face=3D"monospace, monospace">catch(...)</font><=
/div><div><font face=3D"monospace, monospace">{</font></div><div><font face=
=3D"monospace, monospace">=C2=A0x =3D NotDefaultConstructible::recovery_mod=
e();</font></div><div><font face=3D"monospace, monospace">}</font></div><di=
v><font face=3D"monospace, monospace"><br></font></div><div><font face=3D"m=
onospace, monospace">// now use x;</font></div><div><br></div><div>We curre=
ntly cannot write this - we are forced to hold x in an optional or unique_p=
tr - which while solving the language expression problem, has nothing to do=
 with the intent of the algorithm - x is simply not logically optional in t=
his case.=C2=A0</div><div><br></div><div>The answer of course is to wrap th=
e operations involving x into a few smaller functions. But sometimes we don=
&#39;t want to. Essentially we&#39;re forced into something like this:</div=
><div><br></div><div><font face=3D"monospace, monospace">auto make_x =3D [&=
amp;y] {</font></div><div><font face=3D"monospace, monospace">=C2=A0 try {<=
/font></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 x =3D No=
tDefaultConstructible::construct_may_throw(...);</font></div><div><font fac=
e=3D"monospace, monospace">=C2=A0 =C2=A0 x.something_that_may_throw();</fon=
t></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 y =3D x.some=
_property();</font></div><div><font face=3D"monospace, monospace">=C2=A0 =
=C2=A0 return x;</font></div><div><font face=3D"monospace, monospace">=C2=
=A0 }</font></div><div><font face=3D"monospace, monospace">=C2=A0 catch(...=
) {</font></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 retu=
rn=C2=A0 NotDefaultConstructible::recovery_mode();</font></div><div><font f=
ace=3D"monospace, monospace">=C2=A0 }</font></div><div><font face=3D"monosp=
ace, monospace">};<br></font></div><div><font face=3D"monospace, monospace"=
><br></font></div><div><font face=3D"monospace, monospace">auto x =3D make_=
x();</font></div><div><font face=3D"monospace, monospace"><br></font></div>=
<div><font face=3D"monospace, monospace">// use x</font></div><div><br></di=
v><div>I think there are (at least) two opposing arguments here:</div><div>=
<br></div><div>1. Obviously you should be forced to express this code in a =
function because the more single-responsibility functions you have the less=
 complexity you have.</div><div>2. This action is so trivial that I don&#39=
;t want to be forced to express it through an artificial function.</div><di=
v><br></div><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=
<div lang=3D"EN-US" link=3D"blue" vlink=3D"purple"><div class=3D"m_20716245=
10518854165WordSection1"><p class=3D"MsoNormal"><u></u><u></u></p><p class=
=3D"MsoNormal"><u></u>=C2=A0<u></u></p><p class=3D"MsoNormal"><u></u>=C2=A0=
<u></u></p><p class=3D"MsoNormal" style=3D"margin-left:.5in"><b>From:</b> R=
ichard Smith &lt;<a href=3D"mailto:richard@metafoo.co.uk" target=3D"_blank"=
>richard@metafoo.co.uk</a>&gt; <br><b>Sent:</b> Monday, October 22, 2018 7:=
29 PM<br><b>To:</b> <a href=3D"mailto:std-proposals@isocpp.org" target=3D"_=
blank">std-proposals@isocpp.org</a><br><b>Cc:</b> <a href=3D"mailto:contact=
@ncomputers.org" target=3D"_blank">contact@ncomputers.org</a><br><b>Subject=
:</b> Re: [std-proposals] Re: Do ... while structure improvement<u></u><u><=
/u></p><p class=3D"MsoNormal" style=3D"margin-left:.5in"><u></u>=C2=A0<u></=
u></p><div><div><div><p class=3D"MsoNormal" style=3D"margin-left:.5in">On F=
ri, 19 Oct 2018 at 15:24, &lt;<a href=3D"mailto:ziemowit.laski@gmail.com" t=
arget=3D"_blank">ziemowit.laski@gmail.com</a>&gt; wrote:<u></u><u></u></p><=
/div><blockquote style=3D"border:none;border-left:solid #cccccc 1.0pt;paddi=
ng:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;ma=
rgin-bottom:5.0pt"><div><p class=3D"MsoNormal" style=3D"margin-left:.5in">I=
&#39;m late to the party (and maybe this has already made it in), but I&#39=
;d also like to see &#39;do(init) { ... } while(predicate);&#39;, to preven=
t &#39;init&#39; scope leakage.=C2=A0=C2=A0<u></u><u></u></p></div></blockq=
uote><div><p class=3D"MsoNormal" style=3D"margin-left:.5in"><u></u>=C2=A0<u=
></u></p></div><div><p class=3D"MsoNormal" style=3D"margin-left:.5in">`do` =
does not have mandatory braces, so parsing that would be quite challenging,=
 and it would probably introduce lots of syntactic ambiguities. For example=
:<u></u><u></u></p></div><div><p class=3D"MsoNormal" style=3D"margin-left:.=
5in"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal" style=3D"mar=
gin-left:.5in">int **p, **x;<u></u><u></u></p></div><div><p class=3D"MsoNor=
mal" style=3D"margin-left:.5in">void f() {<u></u><u></u></p></div><div><p c=
lass=3D"MsoNormal" style=3D"margin-left:.5in">=C2=A0 do (int (**p) =3D x) (=
*p)[0] =3D 1; while (true);<u></u><u></u></p></div><div><p class=3D"MsoNorm=
al" style=3D"margin-left:.5in">}<u></u><u></u></p></div><div><p class=3D"Ms=
oNormal" style=3D"margin-left:.5in"><u></u>=C2=A0<u></u></p></div><div><p c=
lass=3D"MsoNormal" style=3D"margin-left:.5in">... would be ambiguous betwee=
n declaring a variable named p in a do-initializer and using it in the body=
, and a function-call expression whose callee is (int (**p) =3D x) and whos=
e argument is *p.<u></u><u></u></p></div><div><p class=3D"MsoNormal" style=
=3D"margin-left:.5in">=C2=A0<u></u><u></u></p></div><blockquote style=3D"bo=
rder:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-=
left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><div><div=
><p class=3D"MsoNormal" style=3D"margin-left:.5in">Analogously, it would be=
 good to have (if we don&#39;t have it yet) &#39;try(init) {....} catch(bla=
h) {...} catch(blaz) {....}&#39;, where the scope &#39;init&#39; extends to=
 the last catch block.<u></u><u></u></p></div></div></blockquote><div><p cl=
ass=3D"MsoNormal" style=3D"margin-left:.5in"><u></u>=C2=A0<u></u></p></div>=
<div><p class=3D"MsoNormal" style=3D"margin-left:.5in">This wouldn&#39;t be=
 ambiguous, but is it useful? Do you have a concrete use case for this?<u><=
/u><u></u></p></div><div><p class=3D"MsoNormal" style=3D"margin-left:.5in">=
=C2=A0<u></u><u></u></p></div><blockquote style=3D"border:none;border-left:=
solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:=
5.0pt;margin-right:0in;margin-bottom:5.0pt"><div><div><p class=3D"MsoNormal=
" style=3D"margin-left:.5in">--Zem<br><br>On Thursday, October 16, 2014 at =
9:44:59 AM UTC-7, <a href=3D"mailto:con...@ncomputers.org" target=3D"_blank=
">con...@ncomputers.org</a> wrote:<u></u><u></u></p><blockquote style=3D"bo=
rder:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-=
left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><div><p c=
lass=3D"MsoNormal" style=3D"margin-left:.5in">Thank you very much for your =
time and your answer!<br><br>We&#39;re now two, who proposes the same impro=
vement!<br><br>I think, that the other two ideas are also good!<br><br>Best=
 regards,<br><br><a href=3D"http://ncomputers.org" target=3D"_blank">ncompu=
ters.org</a><br><br>El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus=
 Grech escribi=C3=B3:<u></u><u></u></p><blockquote style=3D"border:none;bor=
der-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;ma=
rgin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><div><p class=3D"MsoNo=
rmal" style=3D"margin-left:.5in">I have suggested the same idea in this thr=
ead:=C2=A0<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/s=
td-proposals/O1rpMw2dNwA" target=3D"_blank">https://groups.google.com/a/iso=
cpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA</a><u></u><u></u></p><div><=
p class=3D"MsoNormal" style=3D"margin-left:.5in">Note that my suggestion is=
 more general. You may want to look at the discussion there.<u></u><u></u><=
/p></div></div></blockquote></div></blockquote></div></div><p class=3D"MsoN=
ormal" style=3D"margin-left:.5in">-- <br>You received this message because =
you are subscribed to the Google Groups &quot;ISO C++ Standard - Future Pro=
posals&quot; group.<br>To unsubscribe from this group and stop receiving em=
ails from it, send an email 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>To view this discu=
ssion on the web visit <a href=3D"https://groups.google.com/a/isocpp.org/d/=
msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_m=
edium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27d=
feb4%40isocpp.org</a>.<u></u><u></u></p></blockquote></div></div><p class=
=3D"MsoNormal" style=3D"margin-left:.5in">-- <br>You received this message =
because you are subscribed to a topic in the Google Groups &quot;ISO C++ St=
andard - Future Proposals&quot; group.<br>To unsubscribe from this topic, v=
isit <a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposal=
s/i-0stW2WkXs/unsubscribe" target=3D"_blank">https://groups.google.com/a/is=
ocpp.org/d/topic/std-proposals/i-0stW2WkXs/unsubscribe</a>.<br>To unsubscri=
be from this group and all its topics, send an email to <a href=3D"mailto:s=
td-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-proposals+unsubs=
cribe@isocpp.org</a>.<br>To post to this group, send email to <a href=3D"ma=
ilto:std-proposals@isocpp.org" target=3D"_blank">std-proposals@isocpp.org</=
a>.<br>To view this discussion on the web visit <a href=3D"https://groups.g=
oogle.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UG=
mMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3D=
footer" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmai=
l.com</a>.<u></u><u></u></p></div></div>

<p></p>

-- <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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f710%24=
%40gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/006801d46d51%2=
4826da7b0%248748f710%24%40gmail.com</a>.<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"l=
tr">Richard Hodges<div><a href=3D"mailto:hodges.r@gmail.com" target=3D"_bla=
nk">hodges.r@gmail.com</a></div><div>office: +442032898513</div><div>home: =
+376841522</div><div>mobile:=C2=A0+376380212 (this will be *expensive* outs=
ide Andorra!)</div><div>skype: madmongo</div><div>facebook: hodges.r</div><=
div><br></div></div></div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CALvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3=
RSiUY4W-w2sWnw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hYxZFCkfFe_=
0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2sWnw%40mail.gmail.com</a>.<br />

--000000000000fd0ffc057945ceed--

.


Author: <ziemowit.laski@gmail.com>
Date: Mon, 29 Oct 2018 11:05:39 -0700
Raw View
This is a multipart message in MIME format.

------=_NextPart_000_00E8_01D46F77.540B3900
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

But wait, I think I may have found a way to salvage my do-while proposal.  =
Currently, the C++ standard specifies

=20


=20

do  <http://nongnu.org/hcb/#statement> statement while (  <http://nongnu.or=
g/hcb/#expression> expression ) ;

 =09

But what if we also added


=20

=20

do(  <http://nongnu.org/hcb/#for-init-statement> init-statement  )   <http:=
//nongnu.org/hcb/#statement> compound_statement while (  <http://nongnu.org=
/hcb/#expression> expression ) ;

=20

Compound statements require braces and so the syntactic/semantic ambiguity =
is removed.

=20

It is a bit clunky, but would work.

=20

From: Richard Hodges <hodges.r@gmail.com>=20
Sent: Sunday, October 28, 2018 1:33 AM
To: std-proposals@isocpp.org
Subject: Re: [std-proposals] Re: Do ... while structure improvement

=20

=20

On Fri, 26 Oct 2018 at 19:29, <ziemowit.laski@gmail.com <mailto:ziemowit.la=
ski@gmail.com> > wrote:

Good point about the introduced =E2=80=98do=E2=80=99 ambiguity.  Looking at=
 your example, I=E2=80=99m not even sure the ambiguity could be resolved _s=
emantically_.  Shame =E2=98=B9

=20

I introduced the try-catch idea merely for =E2=80=9Ccompleteness=E2=80=9D/o=
rthogonality (I=E2=80=99m not a heavy user of exceptions myself), but the i=
dea is as follows:  You acquire some value from somewhere and attempt to pe=
rform computation on it, but if something goes awry, you throw it for someo=
ne else to handle:

=20

try (MyObject val =3D some_acquired_value()) {

  do_something_useful_with(val);

}

catch ( OverflowException e) {

  throw(val);  // so someone else can do something useful with it

}

// but you don=E2=80=99t want val lying around here

=20

This is an interesting case, because for me one of the most annoying things=
 about c++'s try blocks is that the variables don't escape the braces. What=
 I mean to say is that very often you do want at least one of the variables=
 "lying around here" :)

=20

consider this impossible case:

=20

NotDefaultConstructible x;  // illegal

try

{

  x =3D NotDefaultConstructible::construct_may_throw(...);

  x.something_that_may_throw();

  y =3D x.some_property();

}

catch(...)

{

 x =3D NotDefaultConstructible::recovery_mode();

}

=20

// now use x;

=20

We currently cannot write this - we are forced to hold x in an optional or =
unique_ptr - which while solving the language expression problem, has nothi=
ng to do with the intent of the algorithm - x is simply not logically optio=
nal in this case.=20

=20

The answer of course is to wrap the operations involving x into a few small=
er functions. But sometimes we don't want to. Essentially we're forced into=
 something like this:

=20

auto make_x =3D [&y] {

  try {

    x =3D NotDefaultConstructible::construct_may_throw(...);

    x.something_that_may_throw();

    y =3D x.some_property();

    return x;

  }

  catch(...) {

    return  NotDefaultConstructible::recovery_mode();

  }

};

=20

auto x =3D make_x();

=20

// use x

=20

I think there are (at least) two opposing arguments here:

=20

1. Obviously you should be forced to express this code in a function becaus=
e the more single-responsibility functions you have the less complexity you=
 have.

2. This action is so trivial that I don't want to be forced to express it t=
hrough an artificial function.

=20

=20

=20

=20

=20

From: Richard Smith <richard@metafoo.co.uk <mailto:richard@metafoo.co.uk> >=
=20
Sent: Monday, October 22, 2018 7:29 PM
To: std-proposals@isocpp.org <mailto:std-proposals@isocpp.org>=20
Cc: contact@ncomputers.org <mailto:contact@ncomputers.org>=20
Subject: Re: [std-proposals] Re: Do ... while structure improvement

=20

On Fri, 19 Oct 2018 at 15:24, <ziemowit.laski@gmail.com <mailto:ziemowit.la=
ski@gmail.com> > wrote:

I'm late to the party (and maybe this has already made it in), but I'd also=
 like to see 'do(init) { ... } while(predicate);', to prevent 'init' scope =
leakage. =20

=20

`do` does not have mandatory braces, so parsing that would be quite challen=
ging, and it would probably introduce lots of syntactic ambiguities. For ex=
ample:

=20

int **p, **x;

void f() {

  do (int (**p) =3D x) (*p)[0] =3D 1; while (true);

}

=20

.... would be ambiguous between declaring a variable named p in a do-initial=
izer and using it in the body, and a function-call expression whose callee =
is (int (**p) =3D x) and whose argument is *p.

=20

Analogously, it would be good to have (if we don't have it yet) 'try(init) =
{....} catch(blah) {...} catch(blaz) {....}', where the scope 'init' extend=
s to the last catch block.

=20

This wouldn't be ambiguous, but is it useful? Do you have a concrete use ca=
se for this?

=20

--Zem

On Thursday, October 16, 2014 at 9:44:59 AM UTC-7, con...@ncomputers.org <m=
ailto:con...@ncomputers.org>  wrote:

Thank you very much for your time and your answer!

We're now two, who proposes the same improvement!

I think, that the other two ideas are also good!

Best regards,

ncomputers.org <http://ncomputers.org>=20

El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escribi=C3=B3=
:

I have suggested the same idea in this thread: https://groups.google.com/a/=
isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA

Note that my suggestion is more general. You may want to look at the discus=
sion there.

--=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 <mailto:std-proposals+unsubscr=
ibe@isocpp.org> .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.or=
g <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b0ed6ec-12=
fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er> .

--=20
You received this message because you are subscribed to a topic in the Goog=
le Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.or=
g/d/topic/std-proposals/i-0stW2WkXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to std-pro=
posals+unsubscribe@isocpp.org <mailto:std-proposals+unsubscribe@isocpp.org>=
 .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9s=
SfA%40mail.gmail.com <https://groups.google.com/a/isocpp.org/d/msgid/std-pr=
oposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.co=
m?utm_medium=3Demail&utm_source=3Dfooter> .

--=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 <mailto:std-proposals+unsubscr=
ibe@isocpp.org> .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f710%24%40gmail.co=
m <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/006801d46d5=
1%24826da7b0%248748f710%24%40gmail.com?utm_medium=3Demail&utm_source=3Dfoot=
er> .




=20

--=20

Richard Hodges

hodges.r@gmail.com <mailto:hodges.r@gmail.com>=20

office: +442032898513

home: +376841522

mobile: +376380212 (this will be *expensive* outside Andorra!)

skype: madmongo

facebook: hodges.r

=20

--=20
You received this message because you are subscribed to a topic in the Goog=
le Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.or=
g/d/topic/std-proposals/i-0stW2WkXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to std-pro=
posals+unsubscribe@isocpp.org <mailto:std-proposals+unsubscribe@isocpp.org>=
 .
To post to this group, send email to std-proposals@isocpp.org <mailto:std-p=
roposals@isocpp.org> .
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CALvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2s=
Wnw%40mail.gmail.com <https://groups.google.com/a/isocpp.org/d/msgid/std-pr=
oposals/CALvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2sWnw%40mail.gmail.co=
m?utm_medium=3Demail&utm_source=3Dfooter> .

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/00e701d46fb2%240064b9d0%24012e2d70%24%40gmail.co=
m.

------=_NextPart_000_00E8_01D46F77.540B3900
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dutf-8"><meta name=3DGenerator content=3D"Microsoft=
 Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
 {font-family:Courier;
 panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
 {font-family:"Cambria Math";
 panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:Verdana;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
 {font-family:"Segoe UI Emoji";
 panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
 {mso-style-name:msonormal;
 mso-margin-top-alt:auto;
 margin-right:0in;
 mso-margin-bottom-alt:auto;
 margin-left:0in;
 font-size:11.0pt;
 font-family:"Calibri",sans-serif;}
span.EmailStyle19
 {mso-style-type:personal-reply;
 font-family:"Calibri",sans-serif;}
span.terminalsymbol
 {mso-style-name:terminalsymbol;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-family:"Calibri",sans-serif;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>But wait, I thin=
k I may have found a way to salvage my do-while proposal.=C2=A0 Currently, =
the C++ standard specifies<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</=
o:p></p><table class=3DMsoNormalTable border=3D0 cellspacing=3D3 cellpaddin=
g=3D0><tr><td style=3D'padding:.75pt .75pt .75pt .75pt'><p class=3DMsoNorma=
l><span style=3D'font-family:"Verdana",sans-serif'>&nbsp;<o:p></o:p></span>=
</p></td><td style=3D'padding:.75pt .75pt .75pt .75pt'><p class=3DMsoNormal=
><b><span style=3D'font-size:12.0pt;font-family:Courier'>do</span></b><span=
 style=3D'font-family:"Verdana",sans-serif'>&nbsp;<a href=3D"http://nongnu.=
org/hcb/#statement"><span style=3D'font-size:12.0pt;color:green'>statement<=
/span></a>&nbsp;</span><b><span style=3D'font-size:12.0pt;font-family:Couri=
er'>while</span></b><span style=3D'font-family:"Verdana",sans-serif'>&nbsp;=
</span><b><span style=3D'font-size:12.0pt;font-family:Courier'>(</span></b>=
<span style=3D'font-family:"Verdana",sans-serif'>&nbsp;<a href=3D"http://no=
ngnu.org/hcb/#expression"><span style=3D'font-size:12.0pt;color:green'>expr=
ession</span></a>&nbsp;</span><b><span style=3D'font-size:12.0pt;font-famil=
y:Courier'>)</span></b><span style=3D'font-family:"Verdana",sans-serif'>&nb=
sp;</span><b><span style=3D'font-size:12.0pt;font-family:Courier'>;</span><=
/b><span style=3D'font-family:"Verdana",sans-serif'><o:p></o:p></span></p><=
/td></tr><tr><td style=3D'padding:.75pt .75pt .75pt .75pt'></td><td style=
=3D'padding:.75pt .75pt .75pt .75pt'></td></tr></table><p class=3DMsoNormal=
>But what if we also added<o:p></o:p></p><table class=3DMsoNormalTable bord=
er=3D0 cellspacing=3D3 cellpadding=3D0><tr><td style=3D'padding:.75pt .75pt=
 .75pt .75pt'><p class=3DMsoNormal><span style=3D'font-family:"Verdana",san=
s-serif'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span style=3D'fo=
nt-family:"Verdana",sans-serif'><o:p>&nbsp;</o:p></span></p></td><td style=
=3D'padding:.75pt .75pt .75pt .75pt'><p class=3DMsoNormal><b><span style=3D=
'font-size:12.0pt;font-family:Courier'>do(</span></b><span style=3D'font-si=
ze:13.5pt;font-family:"Verdana",sans-serif;color:black'>&nbsp;</span><a hre=
f=3D"http://nongnu.org/hcb/#for-init-statement"><span style=3D'font-size:13=
..5pt;font-family:"Verdana",sans-serif;color:green'>init-statement</span></a=
> =C2=A0)<b><span style=3D'font-size:12.0pt;font-family:Courier'> </span></=
b><span style=3D'font-family:"Verdana",sans-serif'>&nbsp;<a href=3D"http://=
nongnu.org/hcb/#statement"><span style=3D'font-size:12.0pt;color:green'>com=
pound_statement</span></a>&nbsp;</span><b><span style=3D'font-size:12.0pt;f=
ont-family:Courier'>while</span></b><span style=3D'font-family:"Verdana",sa=
ns-serif'>&nbsp;</span><b><span style=3D'font-size:12.0pt;font-family:Couri=
er'>(</span></b><span style=3D'font-family:"Verdana",sans-serif'>&nbsp;<a h=
ref=3D"http://nongnu.org/hcb/#expression"><span style=3D'font-size:12.0pt;c=
olor:green'>expression</span></a>&nbsp;</span><b><span style=3D'font-size:1=
2.0pt;font-family:Courier'>)</span></b><span style=3D'font-family:"Verdana"=
,sans-serif'>&nbsp;</span><b><span style=3D'font-size:12.0pt;font-family:Co=
urier'>;<o:p></o:p></span></b></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p=
><p class=3DMsoNormal>Compound statements require braces and so the syntact=
ic/semantic ambiguity is removed.<o:p></o:p></p><p class=3DMsoNormal><span =
style=3D'font-family:"Verdana",sans-serif'><o:p>&nbsp;</o:p></span></p><p c=
lass=3DMsoNormal><span style=3D'font-family:"Verdana",sans-serif'>It is a b=
it clunky, but would work.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-family:"Verdana",sans-serif'><o:p>&nbsp;</o:p></span></p></td=
></tr></table><p class=3DMsoNormal style=3D'margin-left:.5in'><b>From:</b> =
Richard Hodges &lt;hodges.r@gmail.com&gt; <br><b>Sent:</b> Sunday, October =
28, 2018 1:33 AM<br><b>To:</b> std-proposals@isocpp.org<br><b>Subject:</b> =
Re: [std-proposals] Re: Do ... while structure improvement<o:p></o:p></p><p=
 class=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal style=3D'mso-margin-top-alt:0in;margin-right:0in;margin-b=
ottom:12.0pt;margin-left:.5in'><o:p>&nbsp;</o:p></p><div><div><p class=3DMs=
oNormal style=3D'margin-left:.5in'>On Fri, 26 Oct 2018 at 19:29, &lt;<a hre=
f=3D"mailto:ziemowit.laski@gmail.com">ziemowit.laski@gmail.com</a>&gt; wrot=
e:<o:p></o:p></p></div><blockquote style=3D'border:none;border-left:solid #=
CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'>=
<div><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-=
bottom-alt:auto;margin-left:.5in'>Good point about the introduced =E2=80=98=
do=E2=80=99 ambiguity.&nbsp; Looking at your example, I=E2=80=99m not even =
sure the ambiguity could be resolved _<i>semantically</i>_.&nbsp; Shame <sp=
an style=3D'font-family:"Segoe UI Emoji",sans-serif'>=E2=98=B9</span><o:p><=
/o:p></p><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-b=
ottom-alt:auto;margin-left:.5in'>&nbsp;<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5i=
n'>I introduced the try-catch idea merely for =E2=80=9Ccompleteness=E2=80=
=9D/orthogonality (I=E2=80=99m not a heavy user of exceptions myself), but =
the idea is as follows:&nbsp; You acquire some value from somewhere and att=
empt to perform computation on it, but if something goes awry, you throw it=
 for someone else to handle:<o:p></o:p></p><p class=3DMsoNormal style=3D'ms=
o-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'>&nbsp;<o=
:p></o:p></p><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-marg=
in-bottom-alt:auto;margin-left:.5in'>try (MyObject val =3D some_acquired_va=
lue()) {<o:p></o:p></p><p class=3DMsoNormal style=3D'mso-margin-top-alt:aut=
o;mso-margin-bottom-alt:auto;margin-left:.5in'>&nbsp; do_something_useful_w=
ith(val);<o:p></o:p></p><p class=3DMsoNormal style=3D'mso-margin-top-alt:au=
to;mso-margin-bottom-alt:auto;margin-left:.5in'>}<o:p></o:p></p><p class=3D=
MsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margi=
n-left:.5in'>catch ( OverflowException e) {<o:p></o:p></p><p class=3DMsoNor=
mal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left=
:.5in'>&nbsp; throw(val);&nbsp; // so someone else can do something useful =
with it<o:p></o:p></p><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto=
;mso-margin-bottom-alt:auto;margin-left:.5in'>}<o:p></o:p></p><p class=3DMs=
oNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-=
left:.5in'>// but you don=E2=80=99t want val lying around here<o:p></o:p></=
p></div></div></blockquote><div><p class=3DMsoNormal style=3D'margin-left:.=
5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D'margin-l=
eft:.5in'>This is an interesting case, because for me one of the most annoy=
ing things about c++'s try blocks is that the variables <i>don't</i> escape=
 the braces. What I mean to say is that very often you do want at least one=
 of the variables &quot;lying around here&quot; :)<o:p></o:p></p></div><div=
><p class=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div=
><div><p class=3DMsoNormal style=3D'margin-left:.5in'>consider this impossi=
ble case:<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-lef=
t:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D'margi=
n-left:.5in'><span style=3D'font-family:"Courier New"'>NotDefaultConstructi=
ble x;&nbsp; // illegal</span><o:p></o:p></p></div><div><p class=3DMsoNorma=
l style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'>try<=
/span><o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.=
5in'><span style=3D'font-family:"Courier New"'>{</span><o:p></o:p></p></div=
><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'font-f=
amily:"Courier New"'>&nbsp; x =3D NotDefaultConstructible::construct_may_th=
row(...);</span><o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mar=
gin-left:.5in'><span style=3D'font-family:"Courier New"'>&nbsp; x.something=
_that_may_throw();</span><o:p></o:p></p></div><div><p class=3DMsoNormal sty=
le=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'>&nbsp; y =
=3D x.some_property();</span><o:p></o:p></p></div><div><p class=3DMsoNormal=
 style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'>}</sp=
an><o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in=
'><span style=3D'font-family:"Courier New"'>catch(...)</span><o:p></o:p></p=
></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'=
font-family:"Courier New"'>{</span><o:p></o:p></p></div><div><p class=3DMso=
Normal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'=
>&nbsp;x =3D NotDefaultConstructible::recovery_mode();</span><o:p></o:p></p=
></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'=
font-family:"Courier New"'>}</span><o:p></o:p></p></div><div><p class=3DMso=
Normal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier=
 New"'>// now use x;</span><o:p></o:p></p></div><div><p class=3DMsoNormal s=
tyle=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNor=
mal style=3D'margin-left:.5in'>We currently cannot write this - we are forc=
ed to hold x in an optional or unique_ptr - which while solving the languag=
e expression problem, has nothing to do with the intent of the algorithm - =
x is simply not logically optional in this case.&nbsp;<o:p></o:p></p></div>=
<div><p class=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p><=
/div><div><p class=3DMsoNormal style=3D'margin-left:.5in'>The answer of cou=
rse is to wrap the operations involving x into a few smaller functions. But=
 sometimes we don't want to. Essentially we're forced into something like t=
his:<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5i=
n'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D'margin-lef=
t:.5in'><span style=3D'font-family:"Courier New"'>auto make_x =3D [&amp;y] =
{</span><o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left=
:.5in'><span style=3D'font-family:"Courier New"'>&nbsp; try {</span><o:p></=
o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span st=
yle=3D'font-family:"Courier New"'>&nbsp; &nbsp; x =3D NotDefaultConstructib=
le::construct_may_throw(...);</span><o:p></o:p></p></div><div><p class=3DMs=
oNormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"=
'>&nbsp; &nbsp; x.something_that_may_throw();</span><o:p></o:p></p></div><d=
iv><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'font-fami=
ly:"Courier New"'>&nbsp; &nbsp; y =3D x.some_property();</span><o:p></o:p><=
/p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=
=3D'font-family:"Courier New"'>&nbsp; &nbsp; return x;</span><o:p></o:p></p=
></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'=
font-family:"Courier New"'>&nbsp; }</span><o:p></o:p></p></div><div><p clas=
s=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courie=
r New"'>&nbsp; catch(...) {</span><o:p></o:p></p></div><div><p class=3DMsoN=
ormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'>=
&nbsp; &nbsp; return&nbsp; NotDefaultConstructible::recovery_mode();</span>=
<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'><=
span style=3D'font-family:"Courier New"'>&nbsp; }</span><o:p></o:p></p></di=
v><div><p class=3DMsoNormal style=3D'margin-left:.5in'><span style=3D'font-=
family:"Courier New"'>};</span><o:p></o:p></p></div><div><p class=3DMsoNorm=
al style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMs=
oNormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"=
'>auto x =3D make_x();</span><o:p></o:p></p></div><div><p class=3DMsoNormal=
 style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoN=
ormal style=3D'margin-left:.5in'><span style=3D'font-family:"Courier New"'>=
// use x</span><o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'marg=
in-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D=
'margin-left:.5in'>I think there are (at least) two opposing arguments here=
:<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'>=
<o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.=
5in'>1. Obviously you should be forced to express this code in a function b=
ecause the more single-responsibility functions you have the less complexit=
y you have.<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-l=
eft:.5in'>2. This action is so trivial that I don't want to be forced to ex=
press it through an artificial function.<o:p></o:p></p></div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><di=
v><p class=3DMsoNormal style=3D'margin-left:.5in'>&nbsp;<o:p></o:p></p></di=
v><blockquote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:=
0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=3D=
MsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margi=
n-left:.5in'>&nbsp;<o:p></o:p></p><p class=3DMsoNormal style=3D'mso-margin-=
top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'>&nbsp;<o:p></o:p>=
</p><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom=
-alt:auto;margin-left:1.0in'><b>From:</b> Richard Smith &lt;<a href=3D"mail=
to:richard@metafoo.co.uk" target=3D"_blank">richard@metafoo.co.uk</a>&gt; <=
br><b>Sent:</b> Monday, October 22, 2018 7:29 PM<br><b>To:</b> <a href=3D"m=
ailto:std-proposals@isocpp.org" target=3D"_blank">std-proposals@isocpp.org<=
/a><br><b>Cc:</b> <a href=3D"mailto:contact@ncomputers.org" target=3D"_blan=
k">contact@ncomputers.org</a><br><b>Subject:</b> Re: [std-proposals] Re: Do=
 ... while structure improvement<o:p></o:p></p><p class=3DMsoNormal style=
=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>&=
nbsp;<o:p></o:p></p><div><div><div><p class=3DMsoNormal style=3D'mso-margin=
-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>On Fri, 19 Oct =
2018 at 15:24, &lt;<a href=3D"mailto:ziemowit.laski@gmail.com" target=3D"_b=
lank">ziemowit.laski@gmail.com</a>&gt; wrote:<o:p></o:p></p></div><blockquo=
te style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in=
 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.=
0pt'><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-=
bottom-alt:auto;margin-left:1.0in'>I'm late to the party (and maybe this ha=
s already made it in), but I'd also like to see 'do(init) { ... } while(pre=
dicate);', to prevent 'init' scope leakage.&nbsp;&nbsp;<o:p></o:p></p></div=
></blockquote><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;ms=
o-margin-bottom-alt:auto;margin-left:1.0in'>&nbsp;<o:p></o:p></p></div><div=
><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-al=
t:auto;margin-left:1.0in'>`do` does not have mandatory braces, so parsing t=
hat would be quite challenging, and it would probably introduce lots of syn=
tactic ambiguities. For example:<o:p></o:p></p></div><div><p class=3DMsoNor=
mal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left=
:1.0in'>&nbsp;<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-m=
argin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>int **p, *=
*x;<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-margin-top-a=
lt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>void f() {<o:p></o:p>=
</p></div><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-ma=
rgin-bottom-alt:auto;margin-left:1.0in'>&nbsp; do (int (**p) =3D x) (*p)[0]=
 =3D 1; while (true);<o:p></o:p></p></div><div><p class=3DMsoNormal style=
=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>}=
<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:=
auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>&nbsp;<o:p></o:p></p></d=
iv><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bo=
ttom-alt:auto;margin-left:1.0in'>... would be ambiguous between declaring a=
 variable named p in a do-initializer and using it in the body, and a funct=
ion-call expression whose callee is (int (**p) =3D x) and whose argument is=
 *p.<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-margin-top-=
alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>&nbsp;<o:p></o:p></p=
></div><blockquote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;pad=
ding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;=
margin-bottom:5.0pt'><div><div><p class=3DMsoNormal style=3D'mso-margin-top=
-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>Analogously, it wou=
ld be good to have (if we don't have it yet) 'try(init) {....} catch(blah) =
{...} catch(blaz) {....}', where the scope 'init' extends to the last catch=
 block.<o:p></o:p></p></div></div></blockquote><div><p class=3DMsoNormal st=
yle=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in=
'>&nbsp;<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-margin-=
top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>This wouldn't be=
 ambiguous, but is it useful? Do you have a concrete use case for this?<o:p=
></o:p></p></div><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto=
;mso-margin-bottom-alt:auto;margin-left:1.0in'>&nbsp;<o:p></o:p></p></div><=
blockquote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in=
 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-b=
ottom:5.0pt'><div><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:aut=
o;mso-margin-bottom-alt:auto;margin-left:1.0in'>--Zem<br><br>On Thursday, O=
ctober 16, 2014 at 9:44:59 AM UTC-7, <a href=3D"mailto:con...@ncomputers.or=
g" target=3D"_blank">con...@ncomputers.org</a> wrote:<o:p></o:p></p><blockq=
uote style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0=
in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:=
5.0pt'><div><p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margi=
n-bottom-alt:auto;margin-left:1.0in'>Thank you very much for your time and =
your answer!<br><br>We're now two, who proposes the same improvement!<br><b=
r>I think, that the other two ideas are also good!<br><br>Best regards,<br>=
<br><a href=3D"http://ncomputers.org" target=3D"_blank">ncomputers.org</a><=
br><br>El jueves, 16 de octubre de 2014 01:43:41 UTC-5, Markus Grech escrib=
i=C3=B3:<o:p></o:p></p><blockquote style=3D'border:none;border-left:solid #=
CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;m=
argin-right:0in;margin-bottom:5.0pt'><div><p class=3DMsoNormal style=3D'mso=
-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>I have s=
uggested the same idea in this thread:&nbsp;<a href=3D"https://groups.googl=
e.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpMw2dNwA" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/O1rpM=
w2dNwA</a><o:p></o:p></p><div><p class=3DMsoNormal style=3D'mso-margin-top-=
alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>Note that my suggest=
ion is more general. You may want to look at the discussion there.<o:p></o:=
p></p></div></div></blockquote></div></blockquote></div></div><p class=3DMs=
oNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-=
left:1.0in'>-- <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 =
email 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>To view this discussion on the web visit=
 <a href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2b=
0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.org?utm_medium=3Demail&amp;utm_=
source=3Dfooter" target=3D"_blank">https://groups.google.com/a/isocpp.org/d=
/msgid/std-proposals/2b0ed6ec-12fb-415c-b940-5c66c27dfeb4%40isocpp.org</a>.=
<o:p></o:p></p></blockquote></div></div><p class=3DMsoNormal style=3D'mso-m=
argin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in'>-- <br>You=
 received this message because you are subscribed to a topic in the Google =
Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>To unsubsc=
ribe from this topic, visit <a href=3D"https://groups.google.com/a/isocpp.o=
rg/d/topic/std-proposals/i-0stW2WkXs/unsubscribe" target=3D"_blank">https:/=
/groups.google.com/a/isocpp.org/d/topic/std-proposals/i-0stW2WkXs/unsubscri=
be</a>.<br>To unsubscribe from this group and all its topics, send an email=
 to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blan=
k">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>To view this discussion on the web visit <a h=
ref=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQq=
m2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPWeYKnZ-9sSfA%40mail.gmail.com?utm_medium=3D=
email&amp;utm_source=3Dfooter" target=3D"_blank">https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/CAOfiQqm2eWDcUcVgDaOQg4RBrh4UGmMHfgGDuPW=
eYKnZ-9sSfA%40mail.gmail.com</a>.<o:p></o:p></p></div></div><p class=3DMsoN=
ormal style=3D'margin-left:.5in'>-- <br>You received this message because y=
ou are subscribed to the Google Groups &quot;ISO C++ Standard - Future Prop=
osals&quot; group.<br>To unsubscribe from this group and stop receiving ema=
ils from it, send an email to <a href=3D"mailto:std-proposals+unsubscribe@i=
socpp.org" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>T=
o post to this group, send email to <a href=3D"mailto:std-proposals@isocpp.=
org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>To view this discus=
sion on the web visit <a href=3D"https://groups.google.com/a/isocpp.org/d/m=
sgid/std-proposals/006801d46d51%24826da7b0%248748f710%24%40gmail.com?utm_me=
dium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">https://groups.goog=
le.com/a/isocpp.org/d/msgid/std-proposals/006801d46d51%24826da7b0%248748f71=
0%24%40gmail.com</a>.<o:p></o:p></p></blockquote></div><p class=3DMsoNormal=
 style=3D'margin-left:.5in'><br clear=3Dall><o:p></o:p></p><div><p class=3D=
MsoNormal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div><p class=3D=
MsoNormal style=3D'margin-left:.5in'>-- <o:p></o:p></p><div><div><p class=
=3DMsoNormal style=3D'margin-left:.5in'>Richard Hodges<o:p></o:p></p><div><=
p class=3DMsoNormal style=3D'margin-left:.5in'><a href=3D"mailto:hodges.r@g=
mail.com" target=3D"_blank">hodges.r@gmail.com</a><o:p></o:p></p></div><div=
><p class=3DMsoNormal style=3D'margin-left:.5in'>office: +442032898513<o:p>=
</o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'>home: =
+376841522<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-le=
ft:.5in'>mobile:&nbsp;+376380212 (this will be *expensive* outside Andorra!=
)<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'margin-left:.5in'>=
skype: madmongo<o:p></o:p></p></div><div><p class=3DMsoNormal style=3D'marg=
in-left:.5in'>facebook: hodges.r<o:p></o:p></p></div><div><p class=3DMsoNor=
mal style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p></div></div></div></div=
><p class=3DMsoNormal style=3D'margin-left:.5in'>-- <br>You received this m=
essage because you are subscribed to a topic in the Google Groups &quot;ISO=
 C++ Standard - Future Proposals&quot; group.<br>To unsubscribe from this t=
opic, visit <a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-p=
roposals/i-0stW2WkXs/unsubscribe">https://groups.google.com/a/isocpp.org/d/=
topic/std-proposals/i-0stW2WkXs/unsubscribe</a>.<br>To unsubscribe from thi=
s group and all its topics, send an email to <a href=3D"mailto:std-proposal=
s+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br>To p=
ost to this group, send email to <a href=3D"mailto:std-proposals@isocpp.org=
">std-proposals@isocpp.org</a>.<br>To view this discussion on the web visit=
 <a href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA=
Lvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2sWnw%40mail.gmail.com?utm_medi=
um=3Demail&amp;utm_source=3Dfooter">https://groups.google.com/a/isocpp.org/=
d/msgid/std-proposals/CALvx3hYxZFCkfFe_0sdJJMRZk9WZUV7F9XZ3RSiUY4W-w2sWnw%4=
0mail.gmail.com</a>.<o:p></o:p></p></div></body></html>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/00e701d46fb2%240064b9d0%24012e2d70%24=
%40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/00e701d46fb2%240064b9d0%24012e2d70%2=
4%40gmail.com</a>.<br />

------=_NextPart_000_00E8_01D46F77.540B3900--


.