220 10929 <68f98b78-8bd4-48e0-9e1d-47cfc0492764@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Diggory Blake <diggsey@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Protect Lambda functions against reflection
Date: Wed, 28 May 2014 13:38:38 -0700 (PDT)
Lines: 57
Approved: news@gmane.org
Message-ID: <68f98b78-8bd4-48e0-9e1d-47cfc0492764@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_9_9594182.1401309519231"
X-Trace: ger.gmane.org 1401309531 30529 80.91.229.3 (28 May 2014 20:38:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 28 May 2014 20:38:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC2MLAWQ6ANBBUESTGOAKGQERMEJ2CY@isocpp.org Wed May 28 22:38:42 2014
Return-path: <std-proposals+bncBC2MLAWQ6ANBBUESTGOAKGQERMEJ2CY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f200.google.com ([209.85.220.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC2MLAWQ6ANBBUESTGOAKGQERMEJ2CY@isocpp.org>)
	id 1WpkcT-0002uM-IC
	for gclcip-std-proposals@m.gmane.org; Wed, 28 May 2014 22:38:41 +0200
Original-Received: by mail-vc0-f200.google.com with SMTP id lc6sf42865411vcb.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 28 May 2014 13:38:40 -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=1aTsw+iZW8GHxvv1mWqioJ8e58p2wmf5obUH1l92Ctk=;
        b=XrA+nqrbBI/d6qjVSkWcHJZ9XC/UKo/07z5mWLZuQobzpw7rz/dYl9Ho6065iTv/Qm
         0qWR2XHyOi2BFsyCXcqyimkGmEFzXV50Or4FJFEZGZGLUfQKBKtappjqoU0z11U/uCu5
         ctkZXmTK028gKN6nNal3W6W8h7TdzJua2UPatgc+uNpEDMXsz7UmR1qWNDg+mbje6CN+
         d0YXY1lAZuirl6OuYdIPfQZSGig2504t3DQ3snazy7PnHfH6bMzO1g+WcBXJy/JDtsxK
         lFblQcbuLlOlnImZDv1L8C3D+GK+GRe+7QfybAuURoYxZ5nDwlNURohtQbi54AKPFHeW
         31PQ==
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=1aTsw+iZW8GHxvv1mWqioJ8e58p2wmf5obUH1l92Ctk=;
        b=DCH+lc+dSTQ4iwRQzrcD2EjXUjxUfuyZ63kY1pyBhAbd3OVL4ZfJaqRqrAxgM/lvrT
         NyJrXy83BeKPm3GDZ15dbmtaDnwrONwIOABvxAyARax5AHWPkxh+6nK1DmL71MoORjoX
         +kY58711f9uVoTJebHz8QSFJKKGGCMYjztkzehCXCdmf8Fh/fYbxNx4dbXqL7PvjQZNG
         /fJerdoGYs5j1c4ZCwbwfob0Ft1axy9SNB9oYu/nRQNkWpUlLWmGTr1ST9/3UmSgADlB
         6PwgjJQIuOa63Sa1IzVfxsyhyITjdXIFqP0sBANxbZRoGBJIUPPi1PhTqCVIOLBKg8IC
         Trlw==
X-Gm-Message-State: ALoCoQnAeLFN0C1uWW4eLZM1i0U5uiZ8IzSKAeMafX9gZTJ5aQRDKP2jJcDUWP8Et20Cd4pAI2yT
X-Received: by 10.224.104.2 with SMTP id m2mr895934qao.7.1401309520744;
        Wed, 28 May 2014 13:38:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.50.16 with SMTP id r16ls294060qga.71.gmail; Wed, 28 May
 2014 13:38:40 -0700 (PDT)
X-Received: by 10.140.97.166 with SMTP id m35mr50081qge.28.1401309520227;
        Wed, 28 May 2014 13:38:40 -0700 (PDT)
In-Reply-To: <7ef3d3da-0c1d-443c-88d2-656b91937170@isocpp.org>
X-Original-Sender: diggsey@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:10929
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10929>

------=_Part_9_9594182.1401309519231
Content-Type: text/plain; charset=UTF-8

Also, access modifiers are not there for security reasons - it's trivial to 
bypass them if one really wanted to - they're there to prevent accidental 
misuse, or in other words, human error, although they also serve as a 
useful form of documentation. Since reflection is a tool used by the 
program, not the programmer, there's no reason for access control to exist 
with respect to reflection. When using reflection it should be possible to 
ignore private members if that's what is desired, but allowing the author 
of a class to prevent reflection serves no purpose other than to irritate. 
In .net or java where different parts of the same program can have 
different access rights which are strictly enforced by the runtime, it 
might make sense, in C++ it doesn't.

-- 

--- 
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_9_9594182.1401309519231
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Also, access modifiers are not there for security reasons =
- it's trivial to bypass them if one really wanted to - they're there to pr=
event accidental misuse, or in other words, human error, although they also=
 serve as a useful form of documentation. Since reflection is a tool used b=
y the program, not the programmer, there's no reason for access control to =
exist with respect to reflection. When using reflection it should be possib=
le to ignore private members if that's what is desired, but allowing the au=
thor of a class to prevent reflection serves no purpose other than to irrit=
ate. In .net or java where different parts of the same program can have dif=
ferent access rights which are strictly enforced by the runtime, it might m=
ake sense, in C++ it doesn't.<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_9_9594182.1401309519231--

.
