220 7598 <CAGsORuD1s882hLV49wF-0N8iAADoq5HR1kFoRCTxvdQu+oYTRg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Fixing the private method issue
Date: Mon, 4 Nov 2013 18:26:33 -0500
Lines: 50
Approved: news@gmane.org
Message-ID: <CAGsORuD1s882hLV49wF-0N8iAADoq5HR1kFoRCTxvdQu+oYTRg@mail.gmail.com>
References: <d5cd9fa5-ac2f-465b-b92d-cf2a35607245@isocpp.org>	<5eeafd6f-32f3-4281-9374-617af852fe21@isocpp.org>	<CAOfiQqkokv_B9JDrGGviBM3-yScSCMTjS5wMd49dQpwinPBiWA@mail.gmail.com>	<CAGsORuAspU5wOfv44_pDj01Nj9eVyWPUHYj73jJAqsNTXobx=Q@mail.gmail.com>	<CAOfiQqkxLLXy0981PCCgHPpbVy7wjEqx_V54r_b_pSyAH0JvgQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1383607592 23877 80.91.229.3 (4 Nov 2013 23:26:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 4 Nov 2013 23:26:32 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBKW24CJQKGQEDYZM74Y@isocpp.org Tue Nov 05 00:26:36 2013
Return-path: <std-proposals+bncBCSKRWMD4EHBBKW24CJQKGQEDYZM74Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ve0-f198.google.com ([209.85.128.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBKW24CJQKGQEDYZM74Y@isocpp.org>)
	id 1VdTXY-0007iC-96
	for gclcip-std-proposals@m.gmane.org; Tue, 05 Nov 2013 00:26:36 +0100
Original-Received: by mail-ve0-f198.google.com with SMTP id c14sf6076701vea.5
        for <gclcip-std-proposals@m.gmane.org>; Mon, 04 Nov 2013 15:26:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:sender:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=nhACtWrWHM1NVr4MQaA0k2MMsxpE9VoVF2v9Ef1w0fI=;
        b=kjbyq/kF/laicj+ptT4I8XfOGmlbnqfq3nhRmxhdjn26Yi1E1yZYDaYr2Cz+h3GzTV
         Z09o2iJbYR8CyFyKQdH0GuHZg6Ai9ElzPGfdxraHXyBaLTvoAbnd+ia5lC6VmDjTthCA
         DhQgdkkEU9aBHdIbj/kzqJFaen/aOEqLnSucfg9D5VVpL6Ujzc/ej8Mhc7qnRpDLG6bM
         EvcQTp9s+Mf25ft/peL2XpHzqWZxKRNk8gM/OCAg9C8g2sIHGDONbgpckI6YS3iZzKQs
         st8rU6pjw/+YnTffkmhBUlfROkqtDUe4L1hYKENHDdVdmpbflrwpasOpY/LUR+1PSN6J
         3zCQ==
X-Gm-Message-State: ALoCoQmQkHWLWyAJdhlJ3Axwpe8b1CzpVe6wNDRObFH/UCduczq4zVxpF+Ubqry51sSuU+JElNyE
X-Received: by 10.58.94.162 with SMTP id dd2mr6714189veb.21.1383607594915;
        Mon, 04 Nov 2013 15:26:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.118.103 with SMTP id kl7ls2475580qeb.32.gmail; Mon, 04 Nov
 2013 15:26:34 -0800 (PST)
X-Received: by 10.236.163.228 with SMTP id a64mr15861190yhl.35.1383607594394;
        Mon, 04 Nov 2013 15:26:34 -0800 (PST)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTP id 66si6468952yhb.215.2013.11.04.15.26.34
        for <std-proposals@isocpp.org>;
        Mon, 04 Nov 2013 15:26:34 -0800 (PST)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com
 [209.85.220.178]) by mxa.mailgun.org with ESMTP id 52782d29.467f030-in1;
 Mon, 04 Nov 2013 23:26:33 -0000 (UTC)
Original-Received: by mail-vc0-f178.google.com with SMTP id ie18so5034889vcb.23 for
 <std-proposals@isocpp.org>; Mon, 04 Nov 2013 15:26:33 -0800 (PST)
X-Received: by 10.58.168.205 with SMTP id zy13mr6098166veb.19.1383607593496;
 Mon, 04 Nov 2013 15:26:33 -0800 (PST)
Original-Received: by 10.220.250.6 with HTTP; Mon, 4 Nov 2013 15:26:33 -0800 (PST)
In-Reply-To: <CAOfiQqkxLLXy0981PCCgHPpbVy7wjEqx_V54r_b_pSyAH0JvgQ@mail.gmail.com>
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Sender: zy@miator.net
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates
 184.173.153.196 as permitted sender) smtp.mail=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net;
       dkim=pass header.i=@miator.net
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:7598
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7598>

On Mon, Nov 4, 2013 at 5:17 PM, Richard Smith <richard@metafoo.co.uk> wrote:
>> I don't think so.  This scope, afaics, is private, with contents safe
>> to be added without changing the ABI.
>
> struct Launderer {
>   virtual int get(Foo *p) = 0;
> } *launderer;
>
> class Foo namespace {
>   struct FooLaunderer : Launderer {
>     FooLaunderer() { launderer = this; }
>     int get(Foo *p) { return p->_f; }
>   } static theLaunderer;

I see.  class namespace can be re-opened.

>>  1. Program is written for human to read.  This approach, with
>>     functions taking pointer to objects, basically reverted C++ to C;
>>
>>  2. Friend is flawed: what you need is to grant accessibility to
>>     a set of functions, but what you do is to grant accessibility to
>>     another class scope.  I read this as another "solution from
>>     implementation's view" like using private to make a class
>>     non-copyable.
>>
>> There should be more simple, more obvious answer to the problem
>> raise in this thread.
>
>
> *shrug* It doesn't seem like a big problem to me, especially not once we
> have modules. I don't think it warrants a big heavy language feature of its
> own.

I'm not +1 for class namespace the specific idea.  Can you elaborate
on how to use modules to solve this?

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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/.

.
