220 29984 <CAHfn=+vYTB4zJT7zsQ8chPRJCj7m=P3yv1v_tMREZjfr=eSFpA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Eugenio Bargiacchi <svalorzen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: A strong typedef syntax idea
Date: Wed, 21 Dec 2016 20:28:11 +0100
Lines: 445
Approved: news@gmane.org
Message-ID: <CAHfn=+vYTB4zJT7zsQ8chPRJCj7m=P3yv1v_tMREZjfr=eSFpA@mail.gmail.com>
References: <fd8eda2b-182f-4e32-8fda-c7f728e22fa2@isocpp.org>
 <bd7f888f-d841-4f73-a148-dbb08f59faf0@isocpp.org> <CAHfn=+sqEzTxkH7yDYUg4XBzeVzmBeh7FaB_Y2GZUF+ZdVvBSQ@mail.gmail.com>
 <CACGiwhHGNADMd0orere=YZ2_y7UB8Y0MPU5p25d1fE8i2WKrpA@mail.gmail.com>
 <CAHfn=+sw7zmU8iz7Ysc3e7cpvf3GdrZW32x0pGggvMP=FOY8xQ@mail.gmail.com>
 <CAOU91OPx4SQ_dLiHnpmXXqj69n7tW=OwOb60dXksnWWt8UjViA@mail.gmail.com>
 <CAHfn=+stH4eSm5FxQXT+arev9QDnni0P8SSwGRh8aXLrhmQx7w@mail.gmail.com>
 <CAOU91OOQe0Cq1QS1bR1X0EsWDWZebChkjoT3Dw7+p9H6AAg_tw@mail.gmail.com>
 <CAHfn=+vo2KXEWQHWQY6qB10oGabvZ9jGai3CtWNseLdA7QMNkw@mail.gmail.com> <CAOU91ONWWCLw_vCxNryKEdgA4W+dLr979ZkPDLh7junqx_DETQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114fa2344923ae05443027df
X-Trace: blaine.gmane.org 1482348495 28694 195.159.176.226 (21 Dec 2016 19:28:15 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 21 Dec 2016 19:28:15 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCWJHLVBTMARBTFP5PBAKGQER6QUJZY@isocpp.org Wed Dec 21 20:28:08 2016
Return-path: <std-proposals+bncBCWJHLVBTMARBTFP5PBAKGQER6QUJZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f69.google.com ([209.85.214.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCWJHLVBTMARBTFP5PBAKGQER6QUJZY@isocpp.org>)
	id 1cJmYa-0006j9-Jm
	for gclcip-std-proposals@m.gmane.org; Wed, 21 Dec 2016 20:28:08 +0100
Original-Received: by mail-it0-f69.google.com with SMTP id o141sf144533586itc.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 21 Dec 2016 11:28:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=Y2DxLgryP8sKcXikCpcRwicl+9k81Gwb7VxZxX+y8gk=;
        b=YJ04LyqZSOJCTd1oJMbrGU1jZphAtyJ1uap8EaO32Hmd40omt7kmMOSdNKd3lC2zmE
         ekJ1y9e9755G9hjOKKlzIOs9Xmi7k8gx9tU1+XZtOmMKcLnpZpRQBLxWfuJaAQ/gReOY
         Svr+I/ia9mnQQookX4hTBhy5wLIc/2nbSkbm0++ynYyGNuYW4NdBM/s4sW0clVEh36kS
         1VX7kzHjTCERUt0B9vjKGJ2RlQFf+4n6RDzm99DBBeNAiOciSQ9khZYlhQREUH/7TVEd
         5x+gUJlxn7RzJOhOQx93tZtP312YADh4rbna3YMFW8lhsRHU+1PlyRhzYRXQ6m+ZeIQ9
         mZMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Y2DxLgryP8sKcXikCpcRwicl+9k81Gwb7VxZxX+y8gk=;
        b=d2co4LErm04/9Hy0V9uPfoyUpDQn7hzm+ImYbHMp5X9yS+MToa1t+E571PXxAEzwpI
         qBex5BukH/S1S+eIPGc0V/OzX8FpKLE8gIRGxOgtZ6xIyM2XzFkv4vQlP5B6fVo7aQj0
         CPIxKrckVTRTVo+Yv86kdcZGfi5Fczgu5e+tOU/LtVFWMZJqhD3zpeVHhzwnvDYXnaSU
         d5hxoElHnuqvin2DPH7RKrARDZUfu1rjTX1mU9eL+gJck36GYUNHzGbwiXMYRGoJdkfR
         w5Ky+X7tdKdXWVMLQSn0k3iv8HLYhGi+39k42ryCq+wHOL1IrXeC907zZY/Zgvv9K00j
         S4IA==
X-Gm-Message-State: AIkVDXL71Ub/di2+meiTk/PIsaHDTd+lw3Kiob7GSOoSqyen9D3MIk7YQle9+rtlyIiqjw==
X-Received: by 10.36.80.72 with SMTP id m69mr1245704itb.39.1482348492909;
        Wed, 21 Dec 2016 11:28:12 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.55.165 with SMTP id x34ls18242588otb.8.gmail; Wed, 21 Dec
 2016 11:28:12 -0800 (PST)
X-Received: by 10.159.35.21 with SMTP id 21mr4734454uae.173.1482348492236;
        Wed, 21 Dec 2016 11:28:12 -0800 (PST)
Original-Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com. [2607:f8b0:400c:c08::230])
        by mx.google.com with ESMTPS id g10si2284747uaf.250.2016.12.21.11.28.12
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 21 Dec 2016 11:28:12 -0800 (PST)
Received-SPF: pass (google.com: domain of svalorzen@gmail.com designates 2607:f8b0:400c:c08::230 as permitted sender) client-ip=2607:f8b0:400c:c08::230;
Original-Received: by mail-ua0-x230.google.com with SMTP id 34so25670541uac.1
        for <std-proposals@isocpp.org>; Wed, 21 Dec 2016 11:28:12 -0800 (PST)
X-Received: by 10.159.41.2 with SMTP id t2mr3855838uat.5.1482348491775; Wed,
 21 Dec 2016 11:28:11 -0800 (PST)
Original-Received: by 10.31.227.133 with HTTP; Wed, 21 Dec 2016 11:28:11 -0800 (PST)
In-Reply-To: <CAOU91ONWWCLw_vCxNryKEdgA4W+dLr979ZkPDLh7junqx_DETQ@mail.gmail.com>
X-Original-Sender: svalorzen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 svalorzen@gmail.com designates 2607:f8b0:400c:c08::230 as permitted sender)
 smtp.mailfrom=svalorzen@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:29984
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29984>

--001a114fa2344923ae05443027df
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

>
> I agree but in the same time, most types you need to clone have free
> functions as part of their interfaces.
> This is a classic problem with strong typedefs.
>

I agree, I have though a while about this while writing this proposal. I
thought about giving the possibility of "cloning" a function (as in,
creating an equivalent version line by line with just all instances of the
copied type replaced by the new type) within the scope of the copied class.

But then I realized that if that was allowed, at that point it might as
well be allowed for all classes, for all functions. And so it would become
a feature on its own, or at least a very big scope increase. Thus I removed
it from the proposal.

If you feel that such a feature cannot be reasonably excluded from a
complete proposal about strong typing, I'll try to think about a way to
extend the syntax for functions, or even better find something which looks
equally good for both classes and functions.

My first guess was that maybe trying to keep the proposal as limited in
scope as possible would be best, so that it would be easier what could go
wrong. Even a small step towards strong typing would be better than
nothing, I guess. Even if some classes can be harder to copy/clone if they
are mostly defined by their free-functions ecosystem, still there's many
for which this is not true.

But again, if you feel it would be best to think about this and try to add
it, I'll definitely try to.

On Wed, Dec 21, 2016 at 8:20 PM, Klaim - Jo=C3=ABl Lamotte <mjklaim@gmail.c=
om>
wrote:

>
>
> On 21 December 2016 at 19:41, Eugenio Bargiacchi <svalorzen@gmail.com>
> wrote:
>
>> I suppose that if we want to use foo with B, one could include an
>> operator A() to B.
>>
>
> Not necessarily:
>
> class A
> {
>    std::mutex my_mutex; // not copyable or moveable, not part of the
> interface
> public:
>
>     A();
> };
>
> class B : using/cloning A
> {};
>
> I expect this to work but not that B could be convertible to A without a
> static cast.
>
>
>> In any case, the point in making a strong typedef is that you are indeed
>> making a new type. If it was completely compatible with the old one, the=
re
>> would be little point, right?
>>
>>
> I agree but in the same time, most types you need to clone have free
> functions as part of their interfaces.
> This is a classic problem with strong typedefs.
>
>
>> In any case, I believe this case is what templates are for. They are
>> there to create functions that interact with object with the same
>> interface, so in this case one would want foo to be a templated function=
..
>>
>
> It would be nice but you are talking about a function you might not have
> control over with.
> It can be solved with a cast though.
>
>
>> Copy + Template would be the equivalent of Inheritance + Interfaces.
>> Maybe a way to clone functions could be added in order to interface with
>> old code, but I'm not sure whether it should be in the scope of this
>> proposal or be separated in another one.
>>
>>
> Maybe not, maybe begin with what you have to get initial feedback.
> I watched recently Stroustrup explain that in the end he is not for stron=
g
> typedefs feaures anymore, because just create a type and go with it.
> So I believe that any attempt to put the feature back in discussion will
> have to pass a higher barrier of interest, even if Stroustrup is "only"
> one vote.
>
>
>> For member access, keep in mind that you are making a new class. The ris=
k
>> is exactly the same when you create a new class and expose members which
>> should be private. In any case, this won't make you able to access A's
>> private members, only B's, which is different since it is another class
>> entirely. Why then you would want to create a new class which ignores
>> access specifiers is another problem, but one that exists independently =
of
>> this proposal.
>>
>>
> Ah yes, I understand.
>
>
>
>> On Wed, Dec 21, 2016 at 7:12 PM, Klaim - Jo=C3=ABl Lamotte <mjklaim@gmai=
l.com>
>> wrote:
>>
>>>
>>> On 21 December 2016 at 13:41, Eugenio Bargiacchi <svalorzen@gmail.com>
>>> wrote:
>>>
>>>> Jo=C3=ABl, about copy I feel the same way. I'll try to work out a nice=
r
>>>> terminology.
>>>>
>>>
>>> Maybe use "clone-type" or something like that?
>>>
>>> Anyway yeah even for functions overloading there is always the same
>>> problem with any kind of strong typedef:
>>>
>>> class A {};
>>> class B : using/cloning A {};
>>>
>>> void foo(A& a);
>>>
>>> Here your proposal suggests that foo() cannot be used with B.
>>> But maybe we want that to be possible?
>>> Add a way to clone free functions too? How about allowing all operation=
s
>>> from A to B?
>>>
>>> Also isn't there a risk of member access?
>>>
>>> class A {
>>>     int hidden_value;
>>>   public:
>>>       A();
>>> };
>>>
>>> class B : using/cloning A
>>> {
>>> public:
>>>
>>>    int cheat() { return hidden_value; }
>>> };
>>>
>>>
>>> This looks necessary but a bit problematic also. Apparently Modules
>>> wouldn't change a thing as long
>>> as type members are all considered exported.
>>>
>>> Jo=C3=ABl Lamotte
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "ISO C++ Standard - Future Proposals" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/a/is
>>> ocpp.org/d/topic/std-proposals/gkJUVnL-Fmg/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> std-proposals+unsubscribe@isocpp.org.
>>> To post to this group, send email to std-proposals@isocpp.org.
>>> To view this discussion on the web visit https://groups.google.com/a/is
>>> ocpp.org/d/msgid/std-proposals/CAOU91OOQe0Cq1QS1bR1X0EsWDWZe
>>> bChkjoT3Dw7%2Bp9H6AAg_tw%40mail.gmail.com
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91OOQ=
e0Cq1QS1bR1X0EsWDWZebChkjoT3Dw7%2Bp9H6AAg_tw%40mail.gmail.com?utm_medium=3D=
email&utm_source=3Dfooter>
>>> .
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> To view this discussion on the web visit https://groups.google.com/a/is
>> ocpp.org/d/msgid/std-proposals/CAHfn%3D%2Bvo2KXEWQHWQY6qB10o
>> GabvZ9jGai3CtWNseLdA7QMNkw%40mail.gmail.com
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHfn%3D%2=
Bvo2KXEWQHWQY6qB10oGabvZ9jGai3CtWNseLdA7QMNkw%40mail.gmail.com?utm_medium=
=3Demail&utm_source=3Dfooter>
>> .
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/
> isocpp.org/d/topic/std-proposals/gkJUVnL-Fmg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/CAOU91ONWWCLw_vCxNryKEdgA4W%
> 2BdLr979ZkPDLh7junqx_DETQ%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91ONWWC=
Lw_vCxNryKEdgA4W%2BdLr979ZkPDLh7junqx_DETQ%40mail.gmail.com?utm_medium=3Dem=
ail&utm_source=3Dfooter>
> .
>

--=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAHfn%3D%2BvYTB4zJT7zsQ8chPRJCj7m%3DP3yv1v_tMREZ=
jfr%3DeSFpA%40mail.gmail.com.

--001a114fa2344923ae05443027df
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div>I agree but in the same time, most types you need to clone=
 have free functions as part of their interfaces.</div><div>This is a class=
ic problem with strong typedefs.</div></blockquote><br>I agree, I have thou=
gh a while about this while writing this=20
proposal. I thought about giving the possibility of &quot;cloning&quot; a f=
unction
 (as in, creating an equivalent version line by line with just all=20
instances of the copied type replaced by the new type) within the scope=20
of the copied class.<br><br></div>But then I realized that if that was=20
allowed, at that point it might as well be allowed for all classes, for all=
 functions. And=20
so it would become a feature on its own, or at least a very big scope incre=
ase. Thus I removed it from the=20
proposal.<br><br></div>If you feel that such a feature cannot be reasonably=
 excluded from a complete proposal about strong typing, I&#39;ll try to thi=
nk about a way to extend the syntax for functions, or even better find some=
thing which looks equally good for both classes and functions.<br><br></div=
>My first guess was that maybe trying to keep the proposal as limited in sc=
ope as possible would be best, so that it would be easier what could go wro=
ng. Even a small step towards strong typing would be better than nothing, I=
 guess. Even if some classes can be harder to copy/clone if they are mostly=
 defined by their free-functions ecosystem, still there&#39;s many for whic=
h this is not true.<br><br></div>But again, if you feel it would be best to=
 think about this and try to add it, I&#39;ll definitely try to.<br></div><=
div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Dec 21, 20=
16 at 8:20 PM, Klaim - Jo=C3=ABl Lamotte <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:mjklaim@gmail.com" target=3D"_blank">mjklaim@gmail.com</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote"><span class=3D"">On 21 Dece=
mber 2016 at 19:41, Eugenio Bargiacchi <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:svalorzen@gmail.com" target=3D"_blank">svalorzen@gmail.com</a>&gt;</spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>I su=
ppose that if we want to use foo with B, one could include an operator A() =
to B.</div></div></div></blockquote><div><br></div></span><div>Not necessar=
ily:</div><div><br></div><div>class A</div><div>{</div><div>=C2=A0 =C2=A0st=
d::mutex my_mutex; // not copyable or moveable, not part of the interface</=
div><span class=3D""><div>public:</div><div><br></div><div>=C2=A0 =C2=A0 A(=
);=C2=A0</div><div>};</div><div><br></div><div>class B : using/cloning A</d=
iv></span><div>{};</div><div><br></div><div>I expect this to work but not t=
hat B could be convertible to A without a static cast.</div><span class=3D"=
"><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><di=
v> In any case, the point in making a strong typedef is that you are indeed=
 making a new type. If it was completely compatible with the old one, there=
 would be little point, right?<br><br></div></div></div></blockquote><div><=
br></div></span><div>I agree but in the same time, most types you need to c=
lone have free functions as part of their interfaces.</div><div>This is a c=
lassic problem with strong typedefs.</div><span class=3D""><div>=C2=A0</div=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div></div>In any cas=
e, I believe this case is what templates are for. They are there to create =
functions that interact with object with the same interface, so in this cas=
e one would want foo to be a templated function.</div></div></blockquote><d=
iv><br></div></span><div>It would be nice but you are talking about a funct=
ion you might not have control over with.</div><div>It can be solved with a=
 cast though.</div><span class=3D""><div>=C2=A0</div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr"><div> Copy + Template would be the equivalent of =
Inheritance + Interfaces. Maybe a way to clone functions could be added in =
order to interface with old code, but I&#39;m not sure whether it should be=
 in the scope of this proposal or be separated in another one.<br><br></div=
></div></blockquote><div><br></div></span><div>Maybe not, maybe begin with =
what you have to get initial feedback.</div><div>I watched recently Stroust=
rup explain that in the end he is not for strong typedefs feaures anymore, =
because just create a type and go with it.</div><div>So I believe that any =
attempt to put the feature back in discussion will have to pass a higher ba=
rrier of interest, even if Stroustrup is &quot;only&quot;</div><div>one vot=
e.</div><span class=3D""><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><div></div>For member access, keep in mind that you are maki=
ng a new class. The risk is exactly the same when you create a new class an=
d expose members which should be private. In any case, this won&#39;t make =
you able to access A&#39;s private members, only B&#39;s, which is differen=
t since it is another class entirely. Why then you would want to create a n=
ew class which ignores access specifiers is another problem, but one that e=
xists independently of this proposal.<br></div><div class=3D"gmail_extra"><=
br></div></blockquote><div><br></div></span><div>Ah yes, I understand.</div=
><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div c=
lass=3D"h5"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div><div=
 class=3D"m_-3377085949348013313h5">On Wed, Dec 21, 2016 at 7:12 PM, Klaim =
- Jo=C3=ABl Lamotte <span dir=3D"ltr">&lt;<a href=3D"mailto:mjklaim@gmail.c=
om" target=3D"_blank">mjklaim@gmail.com</a>&gt;</span> wrote:<br></div></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div><div class=3D"m_-3377085949348013313h=
5"><div dir=3D"ltr"><div class=3D"gmail_extra"><span><br><div class=3D"gmai=
l_quote">On 21 December 2016 at 13:41, Eugenio Bargiacchi <span dir=3D"ltr"=
>&lt;<a href=3D"mailto:svalorzen@gmail.com" target=3D"_blank">svalorzen@gma=
il.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Jo<span=
 class=3D"m_-3377085949348013313m_2253048768307237827m_-1761669920559787611=
m_2157231802647884575m_-6092875754422023223gmail-_Tgc">=C3=ABl, about copy =
I feel the same way. I&#39;ll try to work out a nicer terminology.</span></=
div></blockquote></div><br></span>Maybe use &quot;clone-type&quot; or somet=
hing like that?</div><div class=3D"gmail_extra"><br></div><div class=3D"gma=
il_extra">Anyway yeah even for functions overloading there is always the sa=
me problem with any kind of strong typedef:</div><div class=3D"gmail_extra"=
><br></div><div class=3D"gmail_extra">class A {};</div><div class=3D"gmail_=
extra">class B : using/cloning A {};</div><div class=3D"gmail_extra"><br></=
div><div class=3D"gmail_extra">void foo(A&amp; a);</div><div class=3D"gmail=
_extra"><br></div><div class=3D"gmail_extra">Here your proposal suggests th=
at foo() cannot be used with B.</div><div class=3D"gmail_extra">But maybe w=
e want that to be possible?</div><div class=3D"gmail_extra">Add a way to cl=
one free functions too? How about allowing all operations from A to B?</div=
><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">Also isn&#=
39;t there a risk of member access?</div><div class=3D"gmail_extra"><br></d=
iv><div class=3D"gmail_extra">class A {=C2=A0</div><div class=3D"gmail_extr=
a">=C2=A0 =C2=A0 int hidden_value;=C2=A0</div><div class=3D"gmail_extra">=
=C2=A0 public:</div><div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 A();</d=
iv><div class=3D"gmail_extra">};</div><div class=3D"gmail_extra"><br></div>=
<div class=3D"gmail_extra">class B : using/cloning A</div><div class=3D"gma=
il_extra">{</div><div class=3D"gmail_extra">public:</div><div class=3D"gmai=
l_extra"><br></div><div class=3D"gmail_extra">=C2=A0 =C2=A0int cheat() { re=
turn hidden_value; }</div><div class=3D"gmail_extra">};</div><div class=3D"=
gmail_extra"><br></div><div class=3D"gmail_extra"><br></div><div class=3D"g=
mail_extra">This looks necessary but a bit problematic also. Apparently Mod=
ules wouldn&#39;t change a thing as long</div><div class=3D"gmail_extra">as=
 type members are all considered exported.</div><div class=3D"gmail_extra">=
<br></div><div class=3D"gmail_extra">Jo=C3=ABl Lamotte</div><div class=3D"g=
mail_extra"><br></div><div class=3D"gmail_extra"><br></div><div class=3D"gm=
ail_extra"><br></div><div class=3D"gmail_extra"><br></div></div></div></div=
><span><span>

<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/gkJUVnL-Fmg/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/is<wbr>ocpp.org/d/topic/std-proposals<wbr>/g=
kJUVnL-Fmg/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isoc<wbr>pp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOU91OOQe0Cq1QS1bR1X0EsWDWZebChkjoT3=
Dw7%2Bp9H6AAg_tw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/st=
d-proposals<wbr>/CAOU91OOQe0Cq1QS1bR1X0EsWDWZe<wbr>bChkjoT3Dw7%2Bp9H6AAg_tw=
%40mai<wbr>l.gmail.com</a>.<br>
</blockquote></div><br></div></div></div><span>

<p></p>

-- <br><span class=3D"">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
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" target=3D"_=
blank">std-proposals+unsubscribe@isoc<wbr>pp.org</a>.<span class=3D""><br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAHfn%3D%2Bvo2KXEWQHWQY6qB10oGabvZ9jG=
ai3CtWNseLdA7QMNkw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter" target=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/=
std-proposals<wbr>/CAHfn%3D%2Bvo2KXEWQHWQY6qB10o<wbr>GabvZ9jGai3CtWNseLdA7Q=
MNkw%<wbr>40mail.gmail.com</a>.<br>
</blockquote></div><br></div></div><span class=3D"">

<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/gkJUVnL-Fmg/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/<wbr>isocpp.org/d/topic/std-<wbr>proposals/g=
kJUVnL-Fmg/<wbr>unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOU91ONWWCLw_vCxNryKEdgA4W%2BdLr979Z=
kPDLh7junqx_DETQ%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/st=
d-<wbr>proposals/CAOU91ONWWCLw_<wbr>vCxNryKEdgA4W%<wbr>2BdLr979ZkPDLh7junqx=
_DETQ%<wbr>40mail.gmail.com</a>.<br>
</blockquote></div><br></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAHfn%3D%2BvYTB4zJT7zsQ8chPRJCj7m%3DP=
3yv1v_tMREZjfr%3DeSFpA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHfn%3D%=
2BvYTB4zJT7zsQ8chPRJCj7m%3DP3yv1v_tMREZjfr%3DeSFpA%40mail.gmail.com</a>.<br=
 />

--001a114fa2344923ae05443027df--

.
