220 21257 <1d15dbc4-e0c1-4df1-86db-014e11f14d26@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: Resumable expressions p0114r0 vs async/await P0057R0
Date: Sat, 3 Oct 2015 21:44:48 -0700 (PDT)
Lines: 91
Approved: news@gmane.org
Message-ID: <1d15dbc4-e0c1-4df1-86db-014e11f14d26@isocpp.org>
References: <639f0012-8cb4-4db3-82a6-8d042a3497f9@isocpp.org>
 <401aa118-ed0b-4c7b-92cf-3fbd706eff9d@isocpp.org>
 <fcbcc1c4-535c-4fa2-a17d-4acffe84a4b5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2807_63227893.1443933888162"
X-Trace: ger.gmane.org 1443933893 29280 80.91.229.3 (4 Oct 2015 04:44:53 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 4 Oct 2015 04:44:53 +0000 (UTC)
Cc: german.diago@hubblehome.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC47RF4IW4GRBQO5YKYAKGQE3NE3YUQ@isocpp.org Sun Oct 04 06:44:52 2015
Return-path: <std-proposals+bncBC47RF4IW4GRBQO5YKYAKGQE3NE3YUQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f70.google.com ([209.85.192.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC47RF4IW4GRBQO5YKYAKGQE3NE3YUQ@isocpp.org>)
	id 1ZibAJ-00061h-Gj
	for gclcip-std-proposals@m.gmane.org; Sun, 04 Oct 2015 06:44:51 +0200
Original-Received: by qgev79 with SMTP id v79sf157382244qge.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 03 Oct 2015 21:44:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc: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=A+Cain4+agjoq8ARSJQenfNggShp+mcb+AGTD3aotV0=;
        b=n33yiFXYY40sawjRpF1Od3cCl25ZGVusmytBM0EcAubSjOSoFZqX3YtaxzKoA4jb2y
         5DkwRqoIy8DtnR1JZSUU2hRtJnOfArQu70Vl4twk/GyjdqEbA6DboW5OANU1vpKCoV+l
         eJhMTla5SioFlqcMTwHdbTEV+DLUU5jKuokbvpKQ1lC/A5trwKGsLL9Wh3Sc5Y/jk53j
         CDUwibU+EVu65fcYuIGQYBOtQ0dd1j2t5WnRL12sdpBJpaGnrNld4+I3WQHn8bZp6kmj
         JCAl97s0cX2rFatD6vNBGy+SUN/UrNpSSws2PPBJli6rDX7hrOXRVNDW5i7m/mheRspm
         yXSw==
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:cc: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=A+Cain4+agjoq8ARSJQenfNggShp+mcb+AGTD3aotV0=;
        b=L6axZpo5fXvVGD24CwOuxuopMuxLJWVQkewdH3jrDbQHc03mgQzGkIihQrVdhCujy8
         4tzkw6Cye9CbpQGql63wU2GBGAy6aXrtNgHlBlDKYW1502D5xuctZZNAyZ00k+f1oGxi
         g0OiB3SO8xS7e59A9nR2wiIxnJO90BV/njrhln5om87haUeswfDpBsZI23qdPiBZW4jl
         EYHd9ok1co06eXIkg7iNZHKtEAi7Rsuu0Zg8O6UQnKD5oy6I3mQSIVPY6+6h/1FQrKv0
         LU2/OAHfa6nlUgtPT6STlEqhRL9FbgDohE2Yitz/gvsFNda1BBfGjmOU9B6iC8ElBwOO
         GPQA==
X-Gm-Message-State: ALoCoQmM+09bmHzXWCwb9GH1wnyljhgpO52h00i7URWoP6ONDx25p3fPDpK1uWdrUg7AOpdqV4SQ
X-Received: by 10.129.85.149 with SMTP id j143mr20586965ywb.31.1443933890046;
        Sat, 03 Oct 2015 21:44:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.158.79 with SMTP id h76ls182722ioe.104.gmail; Sat, 03 Oct
 2015 21:44:49 -0700 (PDT)
X-Received: by 10.50.114.36 with SMTP id jd4mr62245igb.6.1443933889141;
        Sat, 03 Oct 2015 21:44:49 -0700 (PDT)
In-Reply-To: <fcbcc1c4-535c-4fa2-a17d-4acffe84a4b5@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:21257
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21257>

------=_Part_2807_63227893.1443933888162
Content-Type: multipart/alternative; 
	boundary="----=_Part_2808_1911604701.1443933888162"

------=_Part_2808_1911604701.1443933888162
Content-Type: text/plain; charset=UTF-8


>
> I see a bit of a mistake, again, in my opinion, to embed a scheduler into 
> the language, when you could do it in a library, as Christopher's paper 
> shows.
>

There is absolutely no embedded scheduler in P0057 and never was. P0057 and 
its predecessors provide syntactic sugar for common async and sync patterns 
and it is up to the library to decide what meaning to imbue the coroutine 
with. 

I suggest to look at this presentation:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n4287.pdf

which walks through some of the aspects of P0057 proposal. Note, that the 
await syntax is actually quite old. It first appeared as do-notation in 
Haskell in 1998 and you may notice that P0057 can be used to perform more 
general "monadic" transformations and not only limited to coroutines.

Another thing that the presentation above highlights is that the 
abstraction proposed is unique as it is not just zero-overhead. It is 
negative overhead :-) . Meaning that for some problems, taking the 
well-written code that uses functions / callbacks and rewriting it using 
higher level abstractions, namely, the coroutines as proposed by PP0057 
will result in simpler implementation, smaller object size and faster 
execution. 

-- 

--- 
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_2808_1911604701.1443933888162
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px=
 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); borde=
r-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">I see a bit =
of a mistake, again, in my opinion, to embed a scheduler into the language,=
 when you could do it in a library, as Christopher&#39;s paper shows.</div>=
</blockquote><div><br></div><div>There is absolutely no embedded scheduler =
in P0057 and never was. P0057 and its predecessors provide syntactic sugar =
for common async and sync patterns and it is up to the library to decide wh=
at meaning to imbue the coroutine with. </div><div><br></div><div>I suggest=
 to look at this presentation:</div><div><br></div><div><a href=3D"http://o=
pen-std.org/JTC1/SC22/WG21/docs/papers/2014/n4287.pdf">http://open-std.org/=
JTC1/SC22/WG21/docs/papers/2014/n4287.pdf</a></div><div><br></div><div>whic=
h walks through some of the aspects of P0057 proposal. Note, that the await=
 syntax is actually quite old. It first appeared as do-notation in Haskell =
in 1998 and you may notice that=C2=A0P0057 can be used to perform more gene=
ral &quot;monadic&quot; transformations and=C2=A0not only limited to corout=
ines.</div><div><br></div><div>Another thing that the presentation above hi=
ghlights is that the abstraction proposed is unique as it is not just zero-=
overhead. It=C2=A0is negative overhead :-) . Meaning that for some problems=
, taking the well-written code that uses functions / callbacks=C2=A0and rew=
riting it using higher level abstractions, namely,=C2=A0the coroutines as p=
roposed by PP0057 will result in=C2=A0simpler implementation, smaller objec=
t size and faster execution. </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_2808_1911604701.1443933888162--
------=_Part_2807_63227893.1443933888162--

.
