220 10961 <14877099-7d30-42b6-b349-20e3c2eba23b@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Thibaut Lutz <thibaut.lutz@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Protect Lambda functions against reflection
Date: Thu, 29 May 2014 09:37:54 -0700 (PDT)
Lines: 64
Approved: news@gmane.org
Message-ID: <14877099-7d30-42b6-b349-20e3c2eba23b@isocpp.org>
References: <108c47a2-d952-4f84-a347-923b2ab742ad@isocpp.org>
 <CAFk2RUaPcXONmVug7-_t+imouCVQv9LQ3Hos-yRo=0X-HBQZKQ@mail.gmail.com>
 <CAB+4KHL3MvqYR3s=grM7t8imKHmnjj8s4PAYO01Z+rtq8sivnw@mail.gmail.com>
 <CAFk2RUasQdm4U+w393wqaD-J_6km+xOHhmd_sRyBx7ESy5Eyjw@mail.gmail.com>
 <CAB+4KH+eoF=PcS1pTg+neNA60bcbyZZXJsUenud4Md5RAk+MKw@mail.gmail.com>
 <CAFk2RUacOGaupA6+4JnYMt9ADv4vLOnXL6Ye4ef6crmOB7p78w@mail.gmail.com>
 <CAB+4KHJa1_OoQ5fevDztHYUJDz=uoW5BgzOAiNX19ArNyQhCvg@mail.gmail.com>
 <CAFk2RUbRbXCCETeD=PC3yCHJSigqiCqaCYM8NUx57tugnw4m7w@mail.gmail.com>
 <CANh-dXm+2BcZr-2mcoK_sjOnPgZoczN29A1ZBxQ5xvnOpnwL0A@mail.gmail.com>
 <CAB+4KHJJG=M7PbGJrconmROoOSJPt3hK7CpnD9BWYeSOrEUTXA@mail.gmail.com>
 <7ef3d3da-0c1d-443c-88d2-656b91937170@isocpp.org> <68f98b78-8bd4-48e0-9e1d-47cfc0492764@isocpp.org>
 <CAGg_6+MbbEPCW8mxyDDCZJhrhDKideb_UBvQ42De46w-WRGhjw@mail.gmail.com>
 <af9ceb0c-e51e-446e-8f56-bc58a2144896@isocpp.org> <CAGg_6+OHgQvWR3g+K1ShNESOefrmj1BaNQ6F5CXmnyEOiS01Zw@mail.gmail.com>
 <CAArVCkT6xGs7B2ZaUj3WTRuW6TffTt9S8PCDWBekM5jiHzf1fw@mail.gmail.com>
 <c3204801-96d1-4131-af31-609e7103124c@isocpp.org>
 <00b0838d-edab-492d-a9ec-3c56b6f1eb7e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_269_11640035.1401381474558"
X-Trace: ger.gmane.org 1401381486 3657 80.91.229.3 (29 May 2014 16:38:06 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 29 May 2014 16:38:06 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC66PHON7ACRBY6ETWOAKGQEW5RGGZY@isocpp.org Thu May 29 18:37:58 2014
Return-path: <std-proposals+bncBC66PHON7ACRBY6ETWOAKGQEW5RGGZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC66PHON7ACRBY6ETWOAKGQEW5RGGZY@isocpp.org>)
	id 1Wq3L2-0008GC-Qm
	for gclcip-std-proposals@m.gmane.org; Thu, 29 May 2014 18:37:57 +0200
Original-Received: by mail-oa0-f72.google.com with SMTP id l6sf2667497oag.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 May 2014 09:37:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.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=8gKWJvI7dZpVQ3G/mO075whP6SHf9AzWH6TWh6ahO3Y=;
        b=IodSXpHcChnZP9nmnfeO2wFPnajkKGidUuTLAmmPRIaRtEIMT3YgEJHNqkFuFREru/
         PiusuKy/sXpDlyAODKqWWE5OUzwU6ECZHeVlwwZNVP+C9sJDfEhe1x0Iw7LJKFDI4m9S
         ZPT8lyuCGDQp07PmmwsflBrOcEmWfPwUyY7of+IwEdTyi8eaLHTj9oXhSSiX5bCPEW3C
         75gdakKyQUVEw9BSmOM7mSXLocvI4w+oUHYAT7mEyyUvHyuzuTwiKHX5wECNf1Ovpaat
         /FcIvyk+eORKpixLFN7Cbq4t7irt+4fae8v7O9hHp51wUcP/AcYMzPCcox6wmkLLzqI6
         MVJg==
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=8gKWJvI7dZpVQ3G/mO075whP6SHf9AzWH6TWh6ahO3Y=;
        b=BLBe/hXQAU3XWQaEEARVl4TAaBbZazjUFLtqt8vLlYryPujXBABcNCTuTlFxBnNk/V
         g8KcPdLcYgKyJQ5OBtthwZ8kSgqHa0uWs9dMaaaSe1ABrKBaJvBw6Ngj3OWMmhAx6Vex
         YvmjpvUhvbB+r+T/8hDHy4xkxTUUlKz1GL40/3RpUjPavuQdRmDP4oADY2CFJ2+p61Qy
         PnPZXwln9p+3rX61MF8s/7jiWbZ4e+VpLjDDs6LJAV9G1fdSU+GWuwAPzuoHWrvGrWSR
         6BdqjmHk/p2sQts7jLbukvhPhGPq3rQgYQ2gInQjhmi9+OeLc6VJ6cBDzZqWmalgL+kE
         kDaQ==
X-Gm-Message-State: ALoCoQkpsIaA0npEcfn6BCWENbMqTzlabDmVWiyX2aXRAYdH2OoVJnecLpQG30+WihfWol3Pz2/6
X-Received: by 10.182.125.4 with SMTP id mm4mr3610416obb.49.1401381475865;
        Thu, 29 May 2014 09:37:55 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.19.173 with SMTP id 42ls608418qgh.27.gmail; Thu, 29 May
 2014 09:37:55 -0700 (PDT)
X-Received: by 10.140.36.6 with SMTP id o6mr33681qgo.26.1401381475263;
        Thu, 29 May 2014 09:37:55 -0700 (PDT)
In-Reply-To: <00b0838d-edab-492d-a9ec-3c56b6f1eb7e@isocpp.org>
X-Original-Sender: thibaut.lutz@googlemail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:10961
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10961>

------=_Part_269_11640035.1401381474558
Content-Type: text/plain; charset=UTF-8


>
> This higher level interface would expose the bound variables exactly as 
> they are seen in the capture list, regardless of how the compiler chose to 
> actually implement them.
>

That would force by-ref entities to be represented as members as well, 
otherwise it would not be portable (some reflection code could modify those 
while other can't).

I think it is a bit different from any other class, because while the other 
classes are "not specified" (the guts are considered implementation 
detail), closure members are explicitly obfuscated. There is probably a 
good reason for that, otherwise it would be much simpler to keep the same 
identifiers in the lambda body and the closure function operator.

-- 

--- 
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_269_11640035.1401381474558
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr">This higher level interface would expose the bound variables exactly as=
 they are seen in the capture list, regardless of how the compiler chose to=
 actually implement them.<br></div></blockquote><div><br></div><div>That wo=
uld force by-ref entities to be represented as members as well, otherwise i=
t would not be portable (some reflection code could modify those while othe=
r can't).</div><div><br></div><div>I think it is a bit different from any o=
ther class, because while the other classes are "not specified" (the guts a=
re considered implementation detail), closure members are explicitly obfusc=
ated. There is probably a good reason for that, otherwise it would be much =
simpler to keep the same identifiers in the lambda body and the closure fun=
ction operator.</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_269_11640035.1401381474558--

.
