220 27253 <CAA7YVg3v=-_D-oR5uvXRjJHGWgvd6VmrPPH7O1cvWCgHJ9+_ZA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Viacheslav Usov <via.usov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: loop continuation code
Date: Mon, 25 Jul 2016 18:38:08 +0200
Lines: 67
Approved: news@gmane.org
Message-ID: <CAA7YVg3v=-_D-oR5uvXRjJHGWgvd6VmrPPH7O1cvWCgHJ9+_ZA@mail.gmail.com>
References: <2f575934-e078-411c-9c8a-c2996da7609d@isocpp.org>
 <28358863-5be0-401a-893a-0ae5385156c2@isocpp.org> <CAA7YVg3qqA2nkq5aP7Qur+XjBU+PAwJBffpiZON9+44im_WuQA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113fb874dbb6450538786851
X-Trace: ger.gmane.org 1469464700 5332 80.91.229.3 (25 Jul 2016 16:38:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 25 Jul 2016 16:38:20 +0000 (UTC)
Cc: gmisocpp@gmail.com
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDU6VRPKW4BBB4UA3G6AKGQEU2HH5PI@isocpp.org Mon Jul 25 18:38:14 2016
Return-path: <std-proposals+bncBDU6VRPKW4BBB4UA3G6AKGQEU2HH5PI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f71.google.com ([74.125.82.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDU6VRPKW4BBB4UA3G6AKGQEU2HH5PI@isocpp.org>)
	id 1bRitQ-0001X5-3O
	for gclcip-std-proposals@m.gmane.org; Mon, 25 Jul 2016 18:38:12 +0200
Original-Received: by mail-wm0-f71.google.com with SMTP id x83sf82360286wma.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 25 Jul 2016 09:38:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=SS7G50mGxjOTejo52WkJyzSdhWi9uSfQI3iAYdNIXpg=;
        b=XnXN52GXHfRDO/51vnCJJtYsjw5ywBJHo5rtEcnp2wTt7NRynvb2fJGVHdxy5nkCt0
         GjBKlmTa3aiXDV+K6wlpPEMSeVEL97IaK+9eY//tI/zVNJgCeP9V2QRFoaYDuEAE2JyA
         888pEpvh5BGRdhiP53xQMHAQB3KKqHd0dpcBohCpBM5y6dZ9mYohF2hfohKfwodNe0ui
         G3kRMkepbkIsIvY6UIvIrm9tIoQa99RdzVFcTTkigqXW4cJ79noW1K/iKiJDHiSLVY86
         L72OMlCU+wRj6vwom8/duGZRyXA04e264wFFyX1EfSMP/32CgW99A0I4FpXOnkXQ1KZE
         s0/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=SS7G50mGxjOTejo52WkJyzSdhWi9uSfQI3iAYdNIXpg=;
        b=QZqS9+Nnd/PaZ5DdDqHbFcG63R6pdckU6up+8JiyxEYHqnRPCY6bZnSFiFWZ7OPQIT
         pllHTWh5zQLSoxQtFTOGkk/c3GWvzmJeDKlo/TiC4qBHcXaJZs8bCV78xt8V0RZnVMD1
         h3IyRogxXEfsaNEC6dzjKS6YNBdUqAj+Xy0HmMThlRNxwRi4nqkEkx01KTODdXmUS1Hr
         OhQ6Aqh60Y5XQf3WI9mXPLt0wceW33OAEEFUiujZlsolqhVJRTklV5J1f49Q/jeH+g7u
         ITrHPsjEKuw24x0oZ0e/yCw54oC7dKX2r3jgltK269tL/Hxd7xOmQEQIjIqHsdm8cg9k
         QZog==
X-Gm-Message-State: AEkooussvGjy2ptqTomhmDRWGMRKUFww6FixJxWVUeek2fkVJvo7XeOHr5JDhn1C2TFq1g==
X-Received: by 10.194.119.105 with SMTP id kt9mr2100003wjb.1.1469464691470;
        Mon, 25 Jul 2016 09:38:11 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.1.35 with SMTP id 35ls686697ljb.21.gmail; Mon, 25 Jul 2016
 09:38:10 -0700 (PDT)
X-Received: by 10.46.0.39 with SMTP id 39mr7712434lja.48.1469464690203;
        Mon, 25 Jul 2016 09:38:10 -0700 (PDT)
Original-Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com. [2a00:1450:4010:c07::229])
        by mx.google.com with ESMTPS id i68si15051260lfe.421.2016.07.25.09.38.10
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 25 Jul 2016 09:38:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of via.usov@gmail.com designates 2a00:1450:4010:c07::229 as permitted sender) client-ip=2a00:1450:4010:c07::229;
Original-Received: by mail-lf0-x229.google.com with SMTP id l69so132340681lfg.1
        for <std-proposals@isocpp.org>; Mon, 25 Jul 2016 09:38:10 -0700 (PDT)
X-Received: by 10.25.15.194 with SMTP id 63mr6756242lfp.126.1469464690012;
 Mon, 25 Jul 2016 09:38:10 -0700 (PDT)
Original-Received: by 10.25.214.164 with HTTP; Mon, 25 Jul 2016 09:38:08 -0700 (PDT)
In-Reply-To: <CAA7YVg3qqA2nkq5aP7Qur+XjBU+PAwJBffpiZON9+44im_WuQA@mail.gmail.com>
X-Original-Sender: via.usov@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of via.usov@gmail.com
 designates 2a00:1450:4010:c07::229 as permitted sender) smtp.mailfrom=via.usov@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:27253
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27253>

--001a113fb874dbb6450538786851
Content-Type: text/plain; charset=UTF-8

On Mon, Jul 25, 2016 at 6:19 PM, Viacheslav Usov <via.usov@gmail.com> wrote:

> Since one can already use the comma operator to have multiple expressions
in the iteration statement, you probably meant "multi-statement". In which
case it should support control structures, and things go crazy very quickly
from then on.

And, in fact, this is something that one can already do in modern C++:

for (int i = 0; i < 5; [&]{ if (i == 0) i = 2; else ++i; }())
printf("%d\n", i);

I generally find the idiom [&]{ /* something */ }() very useful, to the
point that I'd like to have some less ugly syntax for it, for example [{ /*
something */ }].

Cheers,
V.

-- 
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/CAA7YVg3v%3D-_D-oR5uvXRjJHGWgvd6VmrPPH7O1cvWCgHJ9%2B_ZA%40mail.gmail.com.

--001a113fb874dbb6450538786851
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Jul 25, 2016 at 6:19 PM, Viacheslav Usov <span dir=3D"ltr">&lt;<a href=
=3D"mailto:via.usov@gmail.com" target=3D"_blank">via.usov@gmail.com</a>&gt;=
</span> wrote:<br><div><br></div><div>&gt; Since one can already use the co=
mma operator to have multiple expressions in the iteration statement, you p=
robably meant &quot;multi-statement&quot;. In which case it should support =
control structures, and things go crazy very quickly from then on.</div><di=
v><br></div><div>And, in fact, this is something that one can already do in=
 modern C++:</div><div><br></div><div><div><span class=3D"" style=3D"white-=
space:pre">	</span>for (int i =3D 0; i &lt; 5; [&amp;]{ if (i =3D=3D 0) i =
=3D 2; else ++i; }())</div><div><span class=3D"" style=3D"white-space:pre">=
		</span>printf(&quot;%d\n&quot;, i);</div></div><div><br></div><div>I gene=
rally find the idiom [&amp;]{ /* something */ }() very useful, to the point=
 that I&#39;d like to have some less ugly syntax for it, for example [{ /* =
something */ }].</div><div><br></div><div>Cheers,</div><div>V.</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/CAA7YVg3v%3D-_D-oR5uvXRjJHGWgvd6VmrPP=
H7O1cvWCgHJ9%2B_ZA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAA7YVg3v%3D-=
_D-oR5uvXRjJHGWgvd6VmrPPH7O1cvWCgHJ9%2B_ZA%40mail.gmail.com</a>.<br />

--001a113fb874dbb6450538786851--

.
