220 21845 <0ebbe01b-854b-4b72-be74-a8dff8785d1c@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Gor Nishanov <gornishanov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: is await an extension of the do-notation? (was Re:
 Re: Resumable expressions p0114r0 vs async/await P0057R0)
Date: Sat, 17 Oct 2015 08:41:18 -0700 (PDT)
Lines: 94
Approved: news@gmane.org
Message-ID: <0ebbe01b-854b-4b72-be74-a8dff8785d1c@isocpp.org>
References: <639f0012-8cb4-4db3-82a6-8d042a3497f9@isocpp.org>
 <fcbcc1c4-535c-4fa2-a17d-4acffe84a4b5@isocpp.org>
 <1d15dbc4-e0c1-4df1-86db-014e11f14d26@isocpp.org>
 <56114953.4030701@wanadoo.fr> <561B403D.4030403@gmail.com>
 <CAOfiQqkKvZfVatJ1Bz4qSvGc-g6iep0xeP1B1=J1-gCu43NXxg@mail.gmail.com>
 <561C07D1.3080304@gmail.com>
 <CAOfiQqnR4GYCttwu8G-44_UEN4WekW19uorEvf-5VC3vOpej-g@mail.gmail.com>
 <561C213F.1060009@gmail.com>
 <fb82d876-8a54-4c28-8e53-297018470cf6@isocpp.org>
 <561C3875.2050701@gmail.com>
 <86924069-44d0-447f-bf8a-a42e46579832@isocpp.org>
 <561D79A7.8080007@gmail.com>
 <894616d6-9609-4038-b2bc-d2c62df21e0f@isocpp.org>
 <99bdb3ae-9214-4440-8572-4c47a61eda46@isocpp.org>
 <58628096-14ae-42b2-89d3-c0bd2183bbc0@isocpp.org>
 <561DC957.8080603@gmail.com>
 <510ce172-976a-4e3a-ae68-31fdb40af4d7@isocpp.org>
 <9dd3f28c-4ffb-4e08-9955-242c46e14527@isocpp.org>
 <31d5f64f-8db9-4ba3-aca7-872114b9776d@isocpp.org>
 <561DE488.3040103@gmail.com>
 <5587a3fd-499c-42b3-bf05-fd5cdc2d9118@isocpp.org>
 <561EF19E.6010405@gmail.com>
 <a4eb8eb5-0ace-457c-b410-219d8c4470db@isocpp.org>
 <f679fc91-5ab5-4894-89f1-cec17361e8f1@isocpp.org>
 <7560dfa8-c77f-41ec-9c0d-c88fe65e20b5@isocpp.org>
 <97537282-c96c-474d-a157-9d160733cb77@isocpp.org>
 <d0ec7d6d-ab25-4a7a-9c81-ab8da50c9aa8@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_705_210623653.1445096478452"
X-Trace: ger.gmane.org 1445096488 30576 80.91.229.3 (17 Oct 2015 15:41:28 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 17 Oct 2015 15:41:28 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC47RF4IW4GRBH6YRGYQKGQEQOTTLZI@isocpp.org Sat Oct 17 17:41:23 2015
Return-path: <std-proposals+bncBC47RF4IW4GRBH6YRGYQKGQEQOTTLZI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f200.google.com ([209.85.220.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC47RF4IW4GRBH6YRGYQKGQEQOTTLZI@isocpp.org>)
	id 1ZnTbl-0006gQ-Kl
	for gclcip-std-proposals@m.gmane.org; Sat, 17 Oct 2015 17:41:21 +0200
Original-Received: by qkas79 with SMTP id s79sf122480011qka.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 17 Oct 2015 08:41:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=YKt+V5DIS8QHxtUI3abZm/+Zot+r94Oi80bpNKtmNVs=;
        b=gp+xDobPh7fIMoURO1ZlILNypeADLPLrb+L6zKeYVCxgDEPI5MEfNjnJg5DINvGLr4
         lae+tD68ilLSU/EZ+upumxb5IjqAX5BzyK7hX0onTH1S3EDkHySBC139wIpIw56QEOqQ
         KsO6DYXvwFoEC8LUs77igDgBRttUCmo39ETE0VZVxElNBlxmdvMsC9VwlqChGuoYbudG
         gQq5rbysyRDEnELL80+JNLhJ8oBxF+xMdbpW5RCuvAr3KXhefB8np4KtUXwY6Cv2xlDI
         Tr0QPHk2cj+XjElnRnO9wYk4SHiuCSTGIoujPljYKoemnW3AAHKirP79gxdefh2eWr1Y
         0lAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=YKt+V5DIS8QHxtUI3abZm/+Zot+r94Oi80bpNKtmNVs=;
        b=FT+6fcNX8ryP597V+NXjTsHbwINFnKBoTahNxFPb/8wZhKrAhV/FnS+S/uu29TIys8
         pYetblOE950x7nseUmPnaE1jvPZ1rJHaUz4E19ONZmOaxJN5iNheFVkhsfkboxe7sloT
         SsWszDSzxL6S7dt3jvoPhMoBLc8S+dSN5cem/AVk1g+ykuy2lZ8uTlIRaKX02p3W7rJE
         Hric2K8X6DhDEtgGkyAvE/oBvv/SdfmW1pBZseiLIOXY7sIr7xMIfAn6cDrBQstvf3Np
         2oeAy/7W1/1BpFMUNEi6gwZ9Cxsu3dmiDCQ6MBdSeT3x1Enc5uVeWx7N63eKKIN75bbz
         15Sg==
X-Gm-Message-State: ALoCoQkrOjv5uR51O8L3Gpkc4s9dLiosWqRJZGjdloqhPxMn28xUuRxb5+YGMKyE70TgmsiDwxNy
X-Received: by 10.140.202.202 with SMTP id x193mr9791398qha.12.1445096480529;
        Sat, 17 Oct 2015 08:41:20 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.117.97 with SMTP id kd1ls507865igb.19.gmail; Sat, 17 Oct
 2015 08:41:19 -0700 (PDT)
X-Received: by 10.50.61.132 with SMTP id p4mr233894igr.1.1445096479310;
        Sat, 17 Oct 2015 08:41:19 -0700 (PDT)
In-Reply-To: <d0ec7d6d-ab25-4a7a-9c81-ab8da50c9aa8@isocpp.org>
X-Original-Sender: GorNishanov@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:21845
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21845>

------=_Part_705_210623653.1445096478452
Content-Type: multipart/alternative; 
	boundary="----=_Part_706_802847780.1445096478453"

------=_Part_706_802847780.1445096478453
Content-Type: text/plain; charset=UTF-8

On Saturday, October 17, 2015 at 8:19:53 AM UTC-7, Nicol Bolas wrote:

I think the real problem is that P0057 is *not meant* to be used for 
> generators. It *can* be, but this functionality is essentially bolted on 
> after-the-fact. 
>

Indeed, for P0057 the staring point was Haskell do-notation and its C# less 
generic variant 'await'. Starting point for P0114 was a generator.
Nevertheless, P0057 generators are at least as efficient as P0114. If you 
have a counter-example, please provide one.

* P0114 is for lightweight generators. 
>

Do you have an example where P0114 will result in more efficient generator 
than P0057?
BTW, In Kona, we may get a wording to make heap elision mandatory for some 
common scenarios, thus, you will be guaranteed that efficiency, not just 
hope for it.

* P0099 is for heavyweight generators (and other things), where having a 
> real callstack is an undeniable *need* for the problem domain.
>

I am a supporter of P0099 and encouraged Oliver and Nat to work on getting 
fibers in the library when we had discussions on it a year ago.
There are definitely cases where using fibers built on top of P0099 is more 
appropriate than using coroutines of P0057.

-- 

--- 
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_706_802847780.1445096478453
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Saturday, October 17, 2015 at 8:19:53 AM UTC-7, Nicol B=
olas wrote:<div><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>I thi=
nk the real problem is that P0057 is <i>not meant</i> to be used for genera=
tors. It <i>can</i> be, but this functionality is essentially bolted on aft=
er-the-fact. </div></blockquote><div><br></div><div>Indeed, for P0057 the s=
taring point was Haskell do-notation and its C# less generic variant &#39;a=
wait&#39;. Starting point for P0114 was a generator.</div><div>Nevertheless=
, P0057 generators are at least as efficient as P0114. If you have a counte=
r-example, please provide one.</div><div><br></div><blockquote class=3D"gma=
il_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid=
;padding-left: 1ex;"><div>* P0114 is for lightweight generators. </div></bl=
ockquote><div><br></div><div>Do you have an example where P0114 will result=
 in more efficient generator than P0057?</div><div>BTW, In Kona, we may get=
 a wording to make heap elision mandatory for some common scenarios, thus, =
you will be guaranteed that efficiency, not just hope for it.</div><div><br=
></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.=
8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>* P0099 is for hea=
vyweight generators (and other things), where having a real callstack is an=
 undeniable <i>need</i> for the problem domain.<br></div></blockquote><div>=
<br></div><div>I am a supporter of P0099 and encouraged Oliver and Nat to w=
ork on getting fibers in the library when we had discussions on it a year a=
go.</div><div>There are definitely cases where using fibers built on top of=
 P0099 is more appropriate than using coroutines of P0057.</div></div></div=
>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_706_802847780.1445096478453--
------=_Part_705_210623653.1445096478452--

.
