220 27260 <faae92a3-7756-bc06-20cd-69526d3160fe@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Miro Knejp <miro.knejp@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: loop continuation code
Date: Tue, 26 Jul 2016 03:13:45 +0200
Lines: 149
Approved: news@gmane.org
Message-ID: <faae92a3-7756-bc06-20cd-69526d3160fe@gmail.com>
References: <2f575934-e078-411c-9c8a-c2996da7609d@isocpp.org>
 <28358863-5be0-401a-893a-0ae5385156c2@isocpp.org>
 <8ee79066-43c5-4624-8fb5-01172eb36d29@isocpp.org>
 <c0a2a265-9128-490c-b80e-d9f7438df92a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------66F14B863DA4449F477AA76B"
X-Trace: ger.gmane.org 1469495574 20784 80.91.229.3 (26 Jul 2016 01:12:54 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 26 Jul 2016 01:12:54 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC6ONSXJ54LBBCPS3K6AKGQETMUJQ6A@isocpp.org Tue Jul 26 03:12:47 2016
Return-path: <std-proposals+bncBC6ONSXJ54LBBCPS3K6AKGQETMUJQ6A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC6ONSXJ54LBBCPS3K6AKGQETMUJQ6A@isocpp.org>)
	id 1bRqvP-0007Hj-L0
	for gclcip-std-proposals@m.gmane.org; Tue, 26 Jul 2016 03:12:47 +0200
Original-Received: by mail-lf0-f70.google.com with SMTP id r97sf129443649lfi.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 25 Jul 2016 18:12:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to: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=wUbSVXSdltYNaU6L6p2LMnz+kMmpUSJzr++gte6Q/qk=;
        b=cJKc1hijKWsnhk0tnbwpRt2GNBRO6aXzjB2gR0xNHJ978G6dA4QHoIfF2EfSl64W/f
         4+Xc7IPAWCa6R4/rSckiqOtMrXFZ6nZ6VENGN1oU26MncyujUq1cyr8oEv/JoJeh16bc
         EpTYnJfN5QCMyzhVQ4DhUm7sXti71VHzGe/aivvwRwqELdiAjmXQgdVj04iB/leZ/YhC
         6Na7Zp53JRsnGkAou9v/FVia38wI/FSFr8ZJlFvO971k4xQf0iE9Qr1i8xTnlfWLdZEJ
         rztNe+KdlGnrRjZZszmN673p96sccO/enSQkF8qN5a2XBMVanxSMcznJ8RaG8JPuRk66
         XGSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to: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=wUbSVXSdltYNaU6L6p2LMnz+kMmpUSJzr++gte6Q/qk=;
        b=jv2mJ/E29aWbPb9KiJKeLykd8/uhKYIImZbMjhhG9vo+JnMHtiAlZWLEQeV0OZe0CK
         O2tWUE15JTsZ+hBQwpVeTE6RmirLVQEky8LsvkhH/LuFaRlEhlCF7yFQf2UHftBTVS2O
         qmuiEBQiEWo5Ve9NMJV+jk3x9CVzzx5cFgUgCVm1dvYXpG/Yru33WVh7XdWIt58wN8cu
         usPBF7PCvb+71Z+QRKJK+jpsPUhhNQCMaXyAJ8Dgwh13YY/eAWDSad/ikEKDhfTgerBc
         4r8ryPa2JN2c7U5uwz9hgSrrHhMrlkoivDWn2GLTR39rNa3fiUeeu1pRSR4+0qkIM6Qh
         OUPQ==
X-Gm-Message-State: AEkoouu10IOGEzF29GcygSptieKCMk1VxGVCLaEG9QtBq47kMPj4Al0KqEmmHfQbu9jjtw==
X-Received: by 10.25.213.193 with SMTP id m184mr2879748lfg.2.1469495562153;
        Mon, 25 Jul 2016 18:12:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.198.132 with SMTP id w126ls2744258wmf.21.gmail; Mon, 25 Jul
 2016 18:12:40 -0700 (PDT)
X-Received: by 10.194.148.232 with SMTP id tv8mr20541776wjb.113.1469495560648;
        Mon, 25 Jul 2016 18:12:40 -0700 (PDT)
Original-Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com. [2a00:1450:400c:c09::22e])
        by mx.google.com with ESMTPS id u62si26414340wmd.129.2016.07.25.18.12.40
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 25 Jul 2016 18:12:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of miro.knejp@gmail.com designates 2a00:1450:400c:c09::22e as permitted sender) client-ip=2a00:1450:400c:c09::22e;
Original-Received: by mail-wm0-x22e.google.com with SMTP id f65so154784959wmi.0
        for <std-proposals@isocpp.org>; Mon, 25 Jul 2016 18:12:40 -0700 (PDT)
X-Received: by 10.194.186.231 with SMTP id fn7mr18125873wjc.164.1469495559988;
        Mon, 25 Jul 2016 18:12:39 -0700 (PDT)
Original-Received: from [192.168.42.16] (ppp-93-104-126-116.dynamic.mnet-online.de. [93.104.126.116])
        by smtp.gmail.com with ESMTPSA id kc6sm18384331wjb.3.2016.07.25.18.12.38
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 25 Jul 2016 18:12:39 -0700 (PDT)
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.2.0
In-Reply-To: <c0a2a265-9128-490c-b80e-d9f7438df92a@isocpp.org>
X-Original-Sender: miro.knejp@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 miro.knejp@gmail.com designates 2a00:1450:400c:c09::22e as permitted sender)
 smtp.mailfrom=miro.knejp@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:27260
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27260>

This is a multi-part message in MIME format.
--------------66F14B863DA4449F477AA76B
Content-Type: text/plain; charset=UTF-8; format=flowed

Am 26.07.2016 um 02:57 schrieb gmisocpp@gmail.com:
>
>
> On Tuesday, July 26, 2016 at 12:01:38 PM UTC+12, Sean Middleditch wrote:
>
>     Or just remove the variable i from the loop entirely because it's
>     unused in the loop body, thus reducing the for statement to:
>
>         for(; pUnicast != nullptr; pUnicat = pUnicast->Next)
>
>     Not that a multi-statement increment wouldn't be useful, but this
>     code snippet is a pretty terrible motivating example. Sorry Glenn! :)
>
>
> It's just some code I saw on reddit. But c'mon, you're being as 
> unimaginative here as I've been lazy in crimping some random code to 
> demonstrate the use case! lol
> I'm not suggesting the need is desperate, but I have myself a few 
> times in the past written loops where I've realised that I'd like to 
> "continue early" a few times - much like returning early - to avoid 
> complicating later code with logic just to avoid it being hit. But I'd 
> still like to do something a bit more significant on each continue 
> occasionally and not want to repeat that code or to have to try 
> to shoe horn that logic into the increment statement of the loop or 
> use a comma there where it just feels wrong and is too constrained.
>
> I don't think you need to be that imaginative to see that ;) but hey 
> I'm sure you won't be alone in your opinion if you still don't agree. 
> I perhaps should contact the author of the original code and see if 
> they agree if this facility would encourage them to use it over goto. 
> That would a be a little interesting to me.
The thing is that papers proposing language changes always need a pretty 
good and convincing motivation section that clearly shows how the 
language feature improves the status-quo. "... I have myself in the past 
written loops where ..." doesn't really cut it without showing 
(optimally real world) examples where any other alternative using 
existing language (or even other proposals) is inferior. You have to 
convince some 100+ experts that your feature is the way to go and have 
answers prepared for the inevitable opposition/criticism.

-- 
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/faae92a3-7756-bc06-20cd-69526d3160fe%40gmail.com.

--------------66F14B863DA4449F477AA76B
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    Am 26.07.2016 um 02:57 schrieb <a class=3D"moz-txt-link-abbreviated" hr=
ef=3D"mailto:gmisocpp@gmail.com">gmisocpp@gmail.com</a>:<br>
    <blockquote
      cite=3D"mid:c0a2a265-9128-490c-b80e-d9f7438df92a@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr"><br>
        <br>
        On Tuesday, July 26, 2016 at 12:01:38 PM UTC+12, Sean
        Middleditch wrote:
        <blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px
          0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204,
          204); border-left-width: 1px; border-left-style: solid;">
          <div dir=3D"ltr">Or just remove the variable i from the loop
            entirely because it's unused in the loop body, thus reducing
            the for statement to:
            <div><br>
            </div>
            <div>=C2=A0 =C2=A0 for(; pUnicast !=3D nullptr; pUnicat =3D
              pUnicast-&gt;Next)
              <div><br>
              </div>
              <div>
                <div>Not that a multi-statement increment wouldn't be
                  useful, but this code snippet is a pretty terrible
                  motivating example. Sorry Glenn! :)</div>
              </div>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>It's just some code I saw on reddit. But c'mon, you're
          being as unimaginative here as I've been lazy in crimping some
          random code to demonstrate=C2=A0the=C2=A0use case! lol</div>
        <div>I'm not suggesting the need=C2=A0is desperate, but I have myse=
lf
          a few times in the past written loops where I've realised that
          I'd like to "continue early" a few times - much like returning
          early - to avoid complicating later code=C2=A0with logic=C2=A0jus=
t to
          avoid it being hit. But I'd still like to do something a bit
          more significant on each continue occasionally and not want to
          repeat that code or=C2=A0to have to try to=C2=A0shoe horn that lo=
gic
          into the increment statement of the loop or use=C2=A0a comma ther=
e
          where it=C2=A0just feels wrong and is too constrained.</div>
        <div><br>
        </div>
        <div>I don't think you need to be=C2=A0that imaginative to see that
          ;)=C2=A0but hey I'm sure you won't be alone in your opinion if yo=
u
          still don't agree. I perhaps should contact the author of the
          original code and see if they agree if this facility would
          encourage them to use it over goto. That would a be a little
          interesting to me.</div>
      </div>
    </blockquote>
    The thing is that papers proposing language changes always need a
    pretty good and convincing motivation section that clearly shows how
    the language feature improves the status-quo. "... I have myself in
    the past written loops where ..." doesn't really cut it without
    showing (optimally real world) examples where any other alternative
    using existing language (or even other proposals) is inferior. You
    have to convince some 100+ experts that your feature is the way to
    go and have answers prepared for the inevitable
    opposition/criticism.<br>
    <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/faae92a3-7756-bc06-20cd-69526d3160fe%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/faae92a3-7756-bc06-20cd-69526d3160fe%=
40gmail.com</a>.<br />

--------------66F14B863DA4449F477AA76B--

.
