220 14282 <ca372c00-a7eb-4d88-921b-cd642d15ac90@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Giovanni Piero Deretta <gpderetta@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: comment on n4244
Date: Tue, 28 Oct 2014 07:00:25 -0700 (PDT)
Lines: 83
Approved: news@gmane.org
Message-ID: <ca372c00-a7eb-4d88-921b-cd642d15ac90@isocpp.org>
References: <5d78c59b-4d67-45f6-9d99-8c4beeeac055@isocpp.org>
 <f783bffc-9810-48dd-b89c-1361ca285815@isocpp.org>
 <5344687e-e1de-4205-885c-b5c2f9580129@isocpp.org>
 <187da710-8adc-4516-bf64-263951503bc7@isocpp.org>
 <42ddf641-27c7-42a5-ab1c-772667797e5b@isocpp.org>
 <a901a369-5d04-4752-92af-b97a3a9496b2@isocpp.org>
 <05a08ac6-f9b8-4ebb-9cb8-9a37a6fd4527@isocpp.org>
 <3ff7fe35-37c6-4f95-8701-1798b0112c10@isocpp.org>
 <CAL52AavgpeZ=44VMTpUMX+wwHa922Scg9-9mvKjVhzfjivo5RA@mail.gmail.com>
 <934c6ace-40cc-484a-96ea-b05aff88482d@isocpp.org>
 <1d0b64d1-ca4b-448a-9589-01fdc0b85d55@isocpp.org>
 <804b06d1-9c63-4ef2-a3e8-ccfbdae30ebf@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1371_1794402965.1414504825296"
X-Trace: ger.gmane.org 1414504834 29345 80.91.229.3 (28 Oct 2014 14:00:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 28 Oct 2014 14:00:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDEP3I7TGEIPVQV6UICRUBE2MXLJI@isocpp.org Tue Oct 28 15:00:28 2014
Return-path: <std-proposals+bncBDEP3I7TGEIPVQV6UICRUBE2MXLJI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f197.google.com ([209.85.213.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDEP3I7TGEIPVQV6UICRUBE2MXLJI@isocpp.org>)
	id 1Xj7Jz-0001TX-8W
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Oct 2014 15:00:27 +0100
Original-Received: by mail-ig0-f197.google.com with SMTP id r10sf4978498igi.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Oct 2014 07:00:26 -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
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=W4rLIgCWwK2oG926b3dmShfJB/IeHMKprzaBGUqTFWo=;
        b=mGqS9/LjZN2tq/9S83C9bw5MIVGQPDFU1dnj4H/VuQo8Ad1dNK3OyIaA6HqF3x4vce
         0KQ3JflZplTmrjH9GiXyAGG9RLttg859JbWNHztL6mfg7OT0pfaU7m91TSpbznyO3yBD
         D3JrfwzvLkQ/ZyhJMhEvwwDATcmNlxYt1EbPllFbJAB2osZs4klxBXCDuzW3ZNsfXvdU
         UWEt92vKONj/Bup2yNubLxCHdHXsRSbt86egs/vHxl2b1otLFubQX9RpvrT1l1yDOwBL
         twH/G/9qjkP4MDh17q3RG29XM/98bdSynRGVuRYxPimP9cANWRvkCU3uD3+kMf720nxD
         T08g==
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:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=W4rLIgCWwK2oG926b3dmShfJB/IeHMKprzaBGUqTFWo=;
        b=YCbpytup1j5qbMpcIeR7w+tozP22KaQ1E98c9NLy/aa59U6OwfUciD5b/IygGYjQEC
         6jZDmvCMDUlGTxmLZl6C42cif/zT8OJI+oisoEfT+7xPlGb+s00h581QFtrn0Q+OxzPz
         MhiScTRlL7aHU+WDaBXL5gr7Ifc/Qf+b6tB08PKtYxn1FtmKRTsnAg7A7gXuUj6yYmmr
         Wlx9ZyxkK3QKZA1UK06kh6z/qXXFUCA+Lq2NsyaKEqOHc00qFyGeNpXCC6L0rQtvOrdw
         tBdJriPKBE8KRywPuB6eA0WI8unl/Wow+AhoLimCY9aHhAPcFETqhJq4ZUzXZGqx8VuN
         PDMQ==
X-Gm-Message-State: ALoCoQkc1fs7AWt09xlOFmXX+Rh0ph4u/YCZOmNDzajZNuJAvgO7fidNJCebjU6ecgoOGxAJURv7
X-Received: by 10.43.35.205 with SMTP id sx13mr2953833icb.1.1414504826620;
        Tue, 28 Oct 2014 07:00:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.43.100 with SMTP id d91ls230468qga.6.gmail; Tue, 28 Oct
 2014 07:00:26 -0700 (PDT)
X-Received: by 10.140.39.85 with SMTP id u79mr10399qgu.16.1414504826065;
        Tue, 28 Oct 2014 07:00:26 -0700 (PDT)
In-Reply-To: <804b06d1-9c63-4ef2-a3e8-ccfbdae30ebf@isocpp.org>
X-Original-Sender: gpderetta@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <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:14282
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14282>

------=_Part_1371_1794402965.1414504825296
Content-Type: text/plain; charset=UTF-8



On Tuesday, October 28, 2014 1:24:20 PM UTC, Gor Nishanov wrote:
>
>  
>
>>  
>> why would they be not safe? They are perfectly safe in N4244 design.  As 
>> safe as the rest of the c++ at least.
>>
>
> Notice that lambda* transforms the variables form the body of operator()() 
> in a member variable of the class. Aliases may appear without you noticing;
>
> std::string s = "hello";
> for(ch: S) yield ch;
>
>
hargh, that's pretty damning. You do not even need the string:
 
  char s[] = "hello";
  for(ch: S) yield ch;

for this specific case the compiler *could* fix the iterator, but you can 
come up with other cases in which it is unfeasible. I agree that making 
generator copyable by default would be terribly error prone.

There might be a way out that might satisfy everybody's requirements. Let 
me think about it.

-- 

--- 
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_1371_1794402965.1414504825296
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, October 28, 2014 1:24:20 PM UTC, Gor N=
ishanov wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
><div>&nbsp;</div><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"><div>&nbsp;<br>why woul=
d they be not safe? They are perfectly safe in N4244 design.&nbsp; As safe =
as the rest of the c++ at least.</div></div></blockquote><div><br></div><di=
v>Notice that lambda* transforms the variables form the body of operator()(=
) in a member variable of the class. Aliases may appear without you noticin=
g;</div><div><br></div><div>std::string s =3D "hello";</div><div>for(ch: S)=
 yield ch;</div><div><br></div></div></blockquote><div><br>hargh, that's pr=
etty damning. You do not even need the string:<br>&nbsp;<br><div>&nbsp; cha=
r s[] =3D "hello";</div><div>&nbsp; for(ch: S) yield ch;</div><div><br>for =
this specific case the compiler *could* fix the iterator, but you can come =
up with other cases in which it is unfeasible. I agree that making generato=
r copyable by default would be terribly error prone.<br></div></div><br>The=
re might be a way out that might satisfy everybody's requirements. Let me t=
hink about it.<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_1371_1794402965.1414504825296--

.
