220 14850 <26265dc3-7d0d-44c1-aa15-69d16f1a6477@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: rjwhitt2001@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Templetized namespaces
Date: Wed, 3 Dec 2014 10:52:30 -0800 (PST)
Lines: 353
Approved: news@gmane.org
Message-ID: <26265dc3-7d0d-44c1-aa15-69d16f1a6477@isocpp.org>
References: <CAFdMc-214LLZ3GtZyd3rZ1MwM4Q0qaTZFZmkXuyDPVZDU6aJ=w@mail.gmail.com>
 <4cfc2db6-97da-4750-9296-5aaaa3475014@isocpp.org>
 <CAOfiQqk_g0nwNP1TZndqrvmBAtqjhXsC0bAFax0nXwCPvwDw6g@mail.gmail.com>
 <CAOU91OPot_7v7vUAZijdU-iqYu=iGsaj4jShf9endWmG-DUrdw@mail.gmail.com>
 <CAFdMc-1AbUTsE-mkvs0Sbcp7J4-_eb6epevLkXUBuGoNYUVgrg@mail.gmail.com>
 <CAOU91OMHqxODvnzpHHSk_bgNUnAoFFqTUc5xTAB3xzUMMk5gkQ@mail.gmail.com>
 <14ff5bcb-5efb-46da-9b86-54382363c3b0@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_39_1844636445.1417632750378"
X-Trace: ger.gmane.org 1417632760 29126 80.91.229.3 (3 Dec 2014 18:52:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 3 Dec 2014 18:52:40 +0000 (UTC)
Cc: contact@ncomputers.org
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDNOHG6LSUNRB35X7WRQKGQE2TRWKDY@isocpp.org Wed Dec 03 19:52:35 2014
Return-path: <std-proposals+bncBDNOHG6LSUNRB35X7WRQKGQE2TRWKDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f199.google.com ([209.85.213.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNOHG6LSUNRB35X7WRQKGQE2TRWKDY@isocpp.org>)
	id 1XwF2P-0005iU-3j
	for gclcip-std-proposals@m.gmane.org; Wed, 03 Dec 2014 19:52:33 +0100
Original-Received: by mail-ig0-f199.google.com with SMTP id hl2sf73591603igb.10
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Dec 2014 10:52:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:content-type:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=/ojCAz4uWwJX1weEgbIMdPcNpGdtwA+Wy0d5Y5waEBY=;
        b=gOj1BZz/ETSq1x4zdODNLuXwNtXgTDPhq+L92pGIBoZOGd3Xl2I8xJmydO1MhMMX8S
         eJAzJDc2rYF7e+EJc3iMVjn0gWP67EKrLjWuBhzVmp5NF4ADaQPxvh8Lv+uOzII7hwOD
         SHQT3UuE+s42+kgNBL1Ugv1KulrSq89dGJIxvoaiyixFmIrF9T0wkcY/m9Impne3pZns
         sRBul+OIu6/Thna2q5wq9ANzKLvAX0mjK9J9VotQQbNKCSIVIVGX0huSdx84G7TnOqez
         o96KMzeuwUkTpHIgExPpsSlOgEMBN9xeb7ao3AqFfu71YBjMyCM1qCt+uqvFLay4Gdeq
         wjQg==
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:cc:message-id:in-reply-to
         :references:subject:mime-version:content-type:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=/ojCAz4uWwJX1weEgbIMdPcNpGdtwA+Wy0d5Y5waEBY=;
        b=A6U4CcSbnNaIgxGlRGZOmPQ7t+Qc16gZGm/jnz7JeNiy5mpjmuaA93I0h2UX+TDxdG
         iTfM56+bbYbBQCNUN+9yo9GPXLNhlSQJUF0LcGNd7wV4SPfXGalQa43Paz9qkppB0B0h
         h4EeD6NW9r7qcxVLOcYBlsT9Y0U1WYeqRFAo+HEfrdGxRdIs3QhxuaemV82B9cIY2knb
         Ix7lMdNITl3qbopFQRr2LL/QbY4XChFCYELG7NPfZgGbQLSZWQvYV86NiEKriRPMGQxZ
         5TLZjm5BWmcOxjcrNnLfnRSLNczNrdzD64ZmFZeboX+kdKN56KL0rs4iubbUscDonqlO
         PARw==
X-Gm-Message-State: ALoCoQmSK3vWxclFlPfd/ShGGDuU3U6M55+X2J3rHuDucU4OL8gT8i0w0GJ6g/ColRCSG5XJv+gh
X-Received: by 10.42.203.136 with SMTP id fi8mr9666775icb.18.1417632752179;
        Wed, 03 Dec 2014 10:52:32 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.79.66 with SMTP id h2ls326530obx.5.gmail; Wed, 03 Dec 2014
 10:52:31 -0800 (PST)
X-Received: by 10.182.94.206 with SMTP id de14mr28036obb.23.1417632751308;
        Wed, 03 Dec 2014 10:52:31 -0800 (PST)
In-Reply-To: <14ff5bcb-5efb-46da-9b86-54382363c3b0@isocpp.org>
X-Original-Sender: rjwhitt2001@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: <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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14850
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14850>

------=_Part_39_1844636445.1417632750378
Content-Type: multipart/alternative; 
	boundary="----=_Part_40_1940408946.1417632750380"

------=_Part_40_1940408946.1417632750380
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Templetized is not a word.=20

On Friday, October 24, 2014 10:59:20 AM UTC-5, con...@ncomputers.org wrote:
>
> I think that templetized templates should be allowed using nested=20
> namespaces by classes, for example:
>
> template<typename Typename>
> class A{
>     namespace B{
>         Typename Variable;
>     }
> };
>
> PF, ncomputers
>
> Am Freitag, 24. Oktober 2014 06:48:09 UTC-5 schrieb Klaim - Jo=C3=ABl Lam=
otte:
>>
>> Sorry I didn't see your reply before.
>>
>> On Sun, Jan 26, 2014 at 1:52 AM, dgutson . <daniel...@gmail.com> wrote:
>>
>>> On Wed, Jan 22, 2014 at 9:47 AM, Klaim - Jo=C3=ABl Lamotte <mjk...@gmai=
l.com>=20
>>> wrote:
>>>
>>>> I had the exact same ideas few months ago after finding myself doing=
=20
>>>> generic library which all types would depend on the same type,
>>>> and remarking how much duplication could be avoided if I was allowed t=
o=20
>>>> specify that a whole bunch of types would automatically have an additi=
onal=20
>>>> template parameter implicitly.
>>>>
>>>> namespace blah< typename X >
>>>> {
>>>>      class K {};
>>>>      template < class T > class U {};
>>>> }
>>>>
>>>> would be translated to=20
>>>>
>>>> namespace blah
>>>> {
>>>>     template< typename X >
>>>>     class K {};
>>>>     template< typename X, class T > class U {};
>>>> }
>>>>
>>>>
>>>> However, after weeks of thinking about this I concluded that:
>>>>
>>>>  1. namespace are not the appropriate construct for this, they really=
=20
>>>> are too different and not really encapsulating anything than names;
>>>>  2. there are a lot of potential issues related to the order of=20
>>>> template arguments;
>>>>
>>>
>>> Please elaborate about the last two points.
>>> =20
>>>
>>
>> Basically, namespaces don't have a unique definition and are only=20
>> affecting naming.
>> Therefore, what would be better to template would be something like a=20
>> module or a class or a mixin (a class component).
>>
>> =20
>>
>>>   3. there is a potential issue for reading the code as you need to see=
=20
>>>> the namespace declaration before being able to follow the rest of the =
code.
>>>>
>>>
>>> I don't find this issue different than any other template declaration,=
=20
>>> for example a nested class of a template class.
>>> =20
>>>
>>
>> Yes, it's a weak point but apparently some people have trouble with this=
..
>> Not sure if it should be taken into account.
>> =20
>>
>>>      What I mean here is basically the same argument that makes Clang=
=20
>>>> developers avoid anonymous namespaces.
>>>>
>>>> Also, I believe that the real thing I do want when I'm writing these=
=20
>>>> generic libraries is actually to generate a whole bunch of types, usin=
g=20
>>>> another type as argument of the process to generate the wanted types.
>>>>
>>>
>>> We agree on that.
>>> =20
>>>
>>>>  Basically, I want one of the features that the Reflection group is=20
>>>> supposed to look for.
>>>>
>>>
>>> I'm working on statement-templates.googlecode.com but that's something=
=20
>>> I will post in this list later.
>>> =20
>>>
>>>>
>>>> Since that realization, I think that efforts should be put to have a=
=20
>>>> new reflection construct instead of making namespace do something too=
=20
>>>> different from it's initial use.
>>>>
>>>>
>>>>
>>>>  --=20
>>>> =20
>>>> ---=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> Visit this group at=20
>>>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>>>
>>>
>>>
>>>
>>> --=20
>>> Who=E2=80=99s got the sweetest disposition?
>>> One guess, that=E2=80=99s who?
>>> Who=E2=80=99d never, ever start an argument?
>>> Who never shows a bit of temperament?
>>> Who's never wrong but always right?
>>> Who'd never dream of starting a fight?
>>> Who get stuck with all the bad luck?=20
>>>
>>> --=20
>>> =20
>>> ---=20
>>> You received this message because you are subscribed to the Google=20
>>> Groups "ISO C++ Standard - Future Proposals" group.
>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>> an email to std-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> Visit this group at=20
>>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>>
>>
>>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_40_1940408946.1417632750380
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Templetized is not a word.&nbsp;<br><br>On Friday, October 24, 2014 10:59:2=
0 AM UTC-5, con...@ncomputers.org wrote:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-le=
ft: 1ex;"><div dir=3D"ltr">I think that templetized templates should be all=
owed using nested namespaces by classes, for example:<br><br><div style=3D"=
background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-styl=
e:solid;border-width:1px;word-wrap:break-word"><code><div><span style=3D"co=
lor:#008">template</span><span style=3D"color:#660">&lt;</span><span style=
=3D"color:#008">typename</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#606">Typename</span><span style=3D"color:#660">&gt;</span><spa=
n style=3D"color:#000"><br></span><span style=3D"color:#008">class</span><s=
pan style=3D"color:#000"> A</span><span style=3D"color:#660">{</span><span =
style=3D"color:#000"><br>&nbsp; &nbsp; </span><span style=3D"color:#008">na=
mespace</span><span style=3D"color:#000"> B</span><span style=3D"color:#660=
">{</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span=
><span style=3D"color:#606">Typename</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#606">Variable</span><span style=3D"color:#660">;</=
span><span style=3D"color:#000"><br>&nbsp; &nbsp; </span><span style=3D"col=
or:#660">}</span><span style=3D"color:#000"><br></span><span style=3D"color=
:#660">};</span><span style=3D"color:#000"><br></span></div></code></div><b=
r>PF, ncomputers<br><br>Am Freitag, 24. Oktober 2014 06:48:09 UTC-5 schrieb=
 Klaim - Jo=C3=ABl Lamotte:<blockquote class=3D"gmail_quote" style=3D"margi=
n:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr">Sorry I didn't see your reply before.<br><div><br><div class=3D"gm=
ail_quote">On Sun, Jan 26, 2014 at 1:52 AM, dgutson . <span dir=3D"ltr">&lt=
;<a>daniel...@gmail.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 dir=3D"ltr"><div><div class=3D"gmail_quote"><span>On Wed, Jan 22,=
 2014 at 9:47 AM, Klaim - Jo=C3=ABl Lamotte <span dir=3D"ltr">&lt;<a>mjk...=
@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr"><div>I had the exact same ideas few month=
s ago after finding myself doing generic library which all types would depe=
nd on the same type,</div>
<div>and remarking how much duplication could be avoided if I was allowed t=
o specify that a whole bunch of types would automatically have an additiona=
l template parameter implicitly.</div>
<div><br></div><div>namespace blah&lt; typename X &gt;</div><div>{</div><di=
v>&nbsp; &nbsp; &nbsp;class K {};</div><div>&nbsp; &nbsp; &nbsp;template &l=
t; class T &gt; class U {};</div>

<div>}</div><div><br></div><div>would be translated to&nbsp;</div><div><br>=
</div><div>namespace blah</div><div>

{</div><div>&nbsp; &nbsp; template&lt; typename X &gt;</div><div>&nbsp; &nb=
sp; class K {};</div><div>&nbsp; &nbsp; template&lt; typename X, class T &g=
t; class U {};</div><div>

}</div><div><br></div><div><br></div><div>However, after weeks of thinking =
about this I concluded that:</div><div><br></div><div>

&nbsp;1. namespace are not the appropriate construct for this, they really =
are too different and not really encapsulating anything than names;</div><d=
iv>&nbsp;2. there are a lot of potential issues related to the order of tem=
plate arguments;</div>
</div></blockquote><div><br></div></span><div>Please elaborate about the la=
st two points.</div><span><div>&nbsp;</div></span></div></div></div></block=
quote><div><br></div><div>Basically, namespaces don't have a unique definit=
ion and are only affecting naming.</div><div>Therefore, what would be bette=
r to template would be something like a module or a class or a mixin (a cla=
ss component).</div><div><br></div><div>&nbsp;</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr"><div><div class=3D"gmail_quote"><span><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1=
px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:=
1ex">
<div dir=3D"ltr">
<div>&nbsp;3. there is a potential issue for reading the code as you need t=
o see the namespace declaration before being able to follow the rest of the=
 code.</div></div></blockquote><div><br></div></span><div>I don't find this=
 issue different than any other template declaration, for example a nested =
class of a template class.</div><span>
<div>&nbsp;</div></span></div></div></div></blockquote><div><br></div><div>=
Yes, it's a weak point but apparently some people have trouble with this.</=
div><div>Not sure if it should be taken into account.</div><div>&nbsp;</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 class=3D"gmail_q=
uote"><span><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
..8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-s=
tyle:solid;padding-left:1ex"><div dir=3D"ltr"><div>&nbsp; &nbsp; &nbsp;What=
 I mean here is basically the same argument that makes Clang developers avo=
id anonymous namespaces.</div>

<div><br></div><div>Also, I believe that the real thing I do want when I'm =
writing these generic libraries is actually to generate a whole bunch of ty=
pes, using another type as argument of the process to generate the wanted t=
ypes.</div>
</div></blockquote><div><br></div></span><div>We agree on that.</div><span>=
<div>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-l=
eft-style:solid;padding-left:1ex">
<div dir=3D"ltr">
<div>Basically, I want one of the features that the Reflection group is sup=
posed to look for.</div></div></blockquote><div><br></div></span><div>I'm w=
orking on&nbsp;<a href=3D"http://statement-templates.googlecode.com" target=
=3D"_blank" onmousedown=3D"this.href=3D'http://statement-templates.googleco=
de.com';return true;" onclick=3D"this.href=3D'http://statement-templates.go=
oglecode.com';return true;">statement-templates.<wbr>googlecode.com</a> but=
 that's something I will post in this list later.</div>
<div>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-l=
eft-style:solid;padding-left:1ex"><span><div dir=3D"ltr"><div><br></div>
<div>Since that realization, I think that efforts should be put to have a n=
ew reflection construct instead of making namespace do something too differ=
ent from it's initial use.</div>
<div><br></div><div><br></div><div><br></div></div></span><span><div><div>

<p></p>

-- <br>
&nbsp;<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a>std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a>std-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" onmousedown=3D"this.href=3D'http://groups=
..google.com/a/isocpp.org/group/std-proposals/';return true;" onclick=3D"thi=
s.href=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';retur=
n true;">http://groups.google.com/a/<wbr>isocpp.org/group/std-<wbr>proposal=
s/</a>.<br>
</div></div></span></blockquote></div><span><br><br clear=3D"all"><div><br>=
</div>-- <br>Who=E2=80=99s got the sweetest disposition?<br>One guess, that=
=E2=80=99s who?<br>Who=E2=80=99d never, ever start an argument?<br>Who neve=
r shows a bit of temperament?<br>Who's never wrong but always right?<br>
Who'd never dream of starting a fight?<br>Who get stuck with all the bad lu=
ck?=20
</span></div></div><div><div>

<p></p>

-- <br>
&nbsp;<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a>std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a>std-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" onmousedown=3D"this.href=3D'http://groups=
..google.com/a/isocpp.org/group/std-proposals/';return true;" onclick=3D"thi=
s.href=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';retur=
n true;">http://groups.google.com/a/<wbr>isocpp.org/group/std-<wbr>proposal=
s/</a>.<br>
</div></div></blockquote></div><br></div></div>
</blockquote></div></blockquote>

<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_40_1940408946.1417632750380--
------=_Part_39_1844636445.1417632750378--

.
