220 25034 <6c282596-68ad-4e61-a137-6142ae5d9c16@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "Components" template with implicitly defined
 partial specializations for all classes
Date: Mon, 7 Mar 2016 11:33:30 -0800 (PST)
Lines: 111
Approved: news@gmane.org
Message-ID: <6c282596-68ad-4e61-a137-6142ae5d9c16@isocpp.org>
References: <fd64d8c9-703d-45d8-a9b2-4b8a222c02f0@isocpp.org>
 <56D9E17F.2070202@wanadoo.fr>
 <2b0bcca0-0939-49f7-939b-4d688f8dfe34@isocpp.org>
 <324dbff9-84da-46f2-b2f3-3d9fe0cc2082@isocpp.org>
 <cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e@isocpp.org>
 <56DA88DF.90000@wanadoo.fr>
 <c303f05a-15d4-445f-81f8-e12f67842bcc@isocpp.org>
 <7e46c46d-2e18-4cec-92c1-4f4d7fbc786b@isocpp.org>
 <d6495758-627e-434d-a867-ed473d869f47@isocpp.org>
 <39bbeb02-62b8-497b-8d65-5780a6baca97@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_447_1339118543.1457379210230"
X-Trace: ger.gmane.org 1457379233 14696 80.91.229.3 (7 Mar 2016 19:33:53 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 7 Mar 2016 19:33:53 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDFLZXWOVYIBBC5P663AKGQETDKMHBY@isocpp.org Mon Mar 07 20:33:35 2016
Return-path: <std-proposals+bncBDFLZXWOVYIBBC5P663AKGQETDKMHBY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f69.google.com ([209.85.218.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDFLZXWOVYIBBC5P663AKGQETDKMHBY@isocpp.org>)
	id 1ad0uK-0003il-MF
	for gclcip-std-proposals@m.gmane.org; Mon, 07 Mar 2016 20:33:32 +0100
Original-Received: by mail-oi0-f69.google.com with SMTP id m82sf152644482oif.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 07 Mar 2016 11:33:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=QlYQoHAM0iV2HB2MhAu/BNn/tEnCy/y+PTGNrDL3QU4=;
        b=XUpdGv7gs44mkL+CiNVLvEjJNj97vs+rkuWkTpleAfA0+N9vzKU1Z49bnuZc9DPXVA
         l2LEaYgavapioV9AaeuJWS8w3DuTnu5wo16KK/KmOYDh1ZArItX5bJJP/XwOFgOoTHS6
         +miYaV2l1pUlCAmn/zWeUTpS2NYEWlUVEXRwX9EkyfXOKFSj0HRL574p9YTht2xhF8WY
         Ecj5G7y6WHSSSlqRdTd3UqyuFXMfR3ObcK4oTK/D9PJYETbTonZLrfeam5zwdK/9BBPb
         W24FTLiAcAwcU788J0baUhfh+M4Iz9EFlv3fx6u+f/CbNdIuQE6PFakPXSsfUhuSsgja
         BQVw==
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:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=QlYQoHAM0iV2HB2MhAu/BNn/tEnCy/y+PTGNrDL3QU4=;
        b=RNmBxGK5Mnh1TrOV5UVMHhjH6SHs4XMH9FnLWaQoNpmOry0aYK3esKggooF0zgDdx1
         GPQgjs9C4iXBPmJjeZSIkIZgcVxZybJAFRLHOTIJoQqinWivHXurRWqTvlFhUf9CrXvv
         wWGlXEXd5Lyjvf3BKieuiWwwgNmBGmV0+9Ha2s/p2jMjG341t50NgvXQKopAD2uMkU0p
         vpWB46XVK0VN0VIajljMr5zfFQb2ew/MaZGdtmmTKlsL429aLR7v4k8vH3OKwuyf4L4T
         si21xkrw08J4HPwW+pMtHcQ8C4ticgUqhN3PT8pn+z3CWGsUpztEdNSFVT5OGFamt60G
         RKjg==
X-Gm-Message-State: AD7BkJKRvYX5PqmX5mhSM9/1pl7pZM/CA5qkp/Cg2ankKqFQ9U6ka/kJavuhxArLugBpYQ==
X-Received: by 10.182.233.170 with SMTP id tx10mr18431693obc.18.1457379211826;
        Mon, 07 Mar 2016 11:33:31 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.29.82 with SMTP id d79ls1039703iod.24.gmail; Mon, 07 Mar
 2016 11:33:30 -0800 (PST)
X-Received: by 10.50.138.165 with SMTP id qr5mr246135igb.10.1457379210856;
        Mon, 07 Mar 2016 11:33:30 -0800 (PST)
In-Reply-To: <39bbeb02-62b8-497b-8d65-5780a6baca97@isocpp.org>
X-Original-Sender: wkaras@yahoo.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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>
X-Original-From: Walt Karas <wkaras@yahoo.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:25034
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25034>

------=_Part_447_1339118543.1457379210230
Content-Type: multipart/alternative; 
	boundary="----=_Part_448_2122990370.1457379210230"

------=_Part_448_2122990370.1457379210230
Content-Type: text/plain; charset=UTF-8



On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Cleiton Santoia wrote:
>
>
>> Experience has shown that good layered architectures are generally 
>> advantageous.  A rule of thumb for a good layered architecture is to have 
>> one capability in a lower layer that supports multiple capabilities in a 
>> higher layer.  As opposed to supporting just one or some or all of those 
>> multiple capabilities in the lower layer.  The base language is the lowest 
>> layer of the C++ architecture.  Therefore, I think it's likely to be better 
>> to have a capability in the base language that allows for support of 
>> reasonably good generic comparison operators, generic stream input/output 
>> operators, generic std::hash, maybe generic JSON/XML input/output, etc 
>> using library code above the base layer.
>>
>
> In the both reflection proposals there are a sample of JSON serialization 
> (in sligtly different ways), but both static and without "mapping" 
> functions.
> You dont need that "Component" structure you proposed, you just expand the 
> pack thru folding. 
>
> Here the code <http://coliru.stacked-crooked.com/view?id=b907dd58003a2748> your 
> 10 liner 'operator ==' lib-olny on top of reflection ( from line 8 to 18 ). 
>
> Please pay attention on lines 10 and 16, in 10 we have a "template 
> folding" and in 16 we have the only line that will change after reflection 
> be accepted (hopefully).
>

In line 10 it might be good to replace c1.*m == c2.*m with a function 
within a class template with simple == as its base definition.  The motive 
being that this class template could be specialized to "fix" the default == 
rather than discarding it if simple == wasn't appropriate for a few 
components among many.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/6c282596-68ad-4e61-a137-6142ae5d9c16%40isocpp.org.

------=_Part_448_2122990370.1457379210230
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Clei=
ton Santoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr"><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><br></di=
v><div>Experience has shown that good layered architectures are generally a=
dvantageous. =C2=A0A rule of thumb for a good layered architecture is to ha=
ve one capability in a lower layer that supports multiple capabilities in a=
 higher layer. =C2=A0As opposed to supporting just one or some or all of th=
ose multiple capabilities in the lower layer. =C2=A0The base language is th=
e lowest layer of the C++ architecture. =C2=A0Therefore, I think it&#39;s l=
ikely to be better to have a capability in the base language that allows fo=
r support of reasonably good generic comparison operators, generic stream i=
nput/output operators, generic std::hash, maybe generic JSON/XML input/outp=
ut, etc using library code above the base layer.</div></div></blockquote><d=
iv><br></div><div>In the both reflection proposals there are a sample of JS=
ON serialization (in sligtly different ways), but both static and without &=
quot;mapping&quot; functions.<br></div><div>You dont need that &quot;Compon=
ent&quot; structure you proposed, you just expand the pack thru folding.=C2=
=A0<br></div><div><br></div><div>Here <a href=3D"http://coliru.stacked-croo=
ked.com/view?id=3Db907dd58003a2748" target=3D"_blank" rel=3D"nofollow" onmo=
usedown=3D"this.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2Fcoli=
ru.stacked-crooked.com%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\=
46usg\75AFQjCNHkLoGXQXLUjEgf9-GztbSysVY81g&#39;;return true;" onclick=3D"th=
is.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2Fcoliru.stacked-cr=
ooked.com%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\46usg\75AFQjC=
NHkLoGXQXLUjEgf9-GztbSysVY81g&#39;;return true;">the code</a>=C2=A0your 10 =
liner &#39;operator =3D=3D&#39; lib-olny on top of reflection ( from line 8=
 to 18 ).=C2=A0<br></div><div><br></div><div>Please pay attention on lines =
10 and 16, in 10 we have a &quot;template folding&quot; and in 16 we have t=
he only line that will change after reflection be accepted=C2=A0(hopefully)=
..</div></div></blockquote><div><br>In line 10 it might be good to replace c=
1.*m =3D=3D c2.*m with a function within a class template with simple =3D=
=3D as its base definition.=C2=A0 The motive being that this class template=
 could be specialized to &quot;fix&quot; the default =3D=3D rather than dis=
carding it if simple =3D=3D wasn&#39;t appropriate for a few components amo=
ng many.<br></div></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/6c282596-68ad-4e61-a137-6142ae5d9c16%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6c282596-68ad-4e61-a137-6142ae5d9c16=
%40isocpp.org</a>.<br />

------=_Part_448_2122990370.1457379210230--
------=_Part_447_1339118543.1457379210230--

.
