220 38038 <CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0xOFy+u0jQEtFnOw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Fornux C++ Superset - Forward Declarations of
 Nested Structures
Date: Tue, 1 May 2018 21:26:49 -0700
Lines: 164
Approved: news@gmane.org
Message-ID: <CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0xOFy+u0jQEtFnOw@mail.gmail.com>
References: <cab4cada-1abe-48b2-9a4b-d6c9f994b805@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="00000000000010e017056b3180f8"
X-Trace: blaine.gmane.org 1525235109 10648 195.159.176.226 (2 May 2018 04:25:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 May 2018 04:25:09 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBIX4UTLQKGQEV2N7AFQ@isocpp.org Wed May 02 06:25:05 2018
Return-path: <std-proposals+bncBDVNBJG4YAIBBIX4UTLQKGQEV2N7AFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f197.google.com ([209.85.128.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBIX4UTLQKGQEV2N7AFQ@isocpp.org>)
	id 1fDjKC-0002fS-Ga
	for gclcip-std-proposals@m.gmane.org; Wed, 02 May 2018 06:25:04 +0200
Original-Received: by mail-wr0-f197.google.com with SMTP id p7-v6sf9416988wrj.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 01 May 2018 21:27:15 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1525235235; cv=pass;
        d=google.com; s=arc-20160816;
        b=HKW3IUa6JITe3DpXBIf7+lzPsadGgy425bT4Ee49VPNREB1Rq/xPZWOwNoTB/lXBEu
         JgPE/dWX4txA5AyVl4C6KozO4ucwJ36vgB3/NnYfzUAieaTmiTzn9AcDSXUZMMtGthxL
         xjqgD/U3p8GWqJb8jX+5wz2SuzXhEppuv1btMM+AQrlLx8/96D6Du/SpJXhHyLWEr5Or
         bdkiMXnap5K1hwSKnXHTd8YNMX5UE2n1VKSk1MJ3ED2koyjzFdXvyy7bfVHXC846b+Az
         tSyre+jqQoe3v+7NdkR2T6geA5sRnlV1ZRFyvgs2IfLSSzmukDv/DMmolellAJ8c5R4V
         ZXqg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=fc6ex31yuFSoy136TsyjOxnRN8RtRkwMqeGHI5xGlwA=;
        b=mXoh8xsppZtzxcG3/cCFmD39xRxvXspvM/6gCnHo0NxBhiL6Ge8FmiGEVkVlnoBQO2
         2xIFbJbTq5iZWt88VH22oqvxYy6n+Vg/UByPMwiiK52cFnLUPZu4RN5UGbfWoyXNhumw
         8gzvb7Buu/H0hLnee3+c08FWCFGHKJiQzk2aqJbr3T/mA/nZ6timnz7rXIYzGLg8tLpD
         4+BjdVHgXHV7kQyq/XgX6JV3e9+rZ0G639ltM1jY5l1oIxaiRJYptm/aaKXPMljGgEie
         FwSYAodnHsuZpqyXGVxiwaa+KqGA70RsuRD66OAM269eANfCNdOYhcyCbnARmUqJTnyk
         gtSQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@metafoo.co.uk header.s=default header.b=NuS2XgtM;
       spf=neutral (google.com: 81.27.85.19 is neither permitted nor denied by best guess record for domain of richard@metafoo.co.uk) smtp.mailfrom=richard@metafoo.co.uk
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:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=fc6ex31yuFSoy136TsyjOxnRN8RtRkwMqeGHI5xGlwA=;
        b=aj/zzZu4AehBHFEpDJUimPDLTYUEOPsfGbt1uxEUL/H+ohBbIEzvt5pU5G8WDoxLUA
         +j37eyW6T3DzHnV7enqybH+3+K8M5ZWyGyiAEGD6mgVm9ulsQa8n34Z1uwA+SUurDCYv
         shHceBrgJStDkQ1Y6jKgZenZIoVgm9JIjNzJRFwdfNCF0W1hSd4Mhm3wD99xeUT4BiF2
         Cx++cuwLXvv0BCGg0/egE2gGww2GDHq2l0a9mIV2PZD8sAxKw8vVFeRIboAn2sAD/YZL
         y2tOz6X3F8bwDBl542UL8UNKjmjcLS4Aj9s6Kr2NwC+LaX45ihCQUZhWyHZLiGLONPBH
         JrtA==
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=fc6ex31yuFSoy136TsyjOxnRN8RtRkwMqeGHI5xGlwA=;
        b=if61sylJ6ZM4nZLlZeAki/bGP3JvCHV5z3BX24CF/WN+BhH6kZzgpm5no6JCoC6Kxp
         3kC+vGDsn5IX1UJVZtGhyU+EZh2TJcCMlNJ/FHnjjlPkAqZhSAmIiy4cJ3C3betnEaCk
         v3EPlcAL5IKDf1Tkrc51v6nYpUT+GIEUAFkCAUgfXvotQxuiCd0y6Cd1TdFgk+e53fgv
         s1RmDPcFR06uOZHSmpCSKaoCPx9d6yx9uf86Tv/uTpnKa15Fx4fNq0dmDxYU5ER7fQ1J
         N7ZKBRcMkt12owjWZAuk4pW15naxt9AZpUf7JUCdAk+6qoM60WVR0JN8AFDsjWvL7bOV
         9fuw==
X-Gm-Message-State: ALQs6tBg5X1+xW7TZTapnh8s8VZ8pMQgp3xXX84P1bKqlpydW0rQM3cC
	AHf7KnhYuQ7IuPwEyVrXhfnD0A==
X-Google-Smtp-Source: AB8JxZrbVR8ZL+SIJjSYaFXFMWiq8l9xBjxQp6AcKM1p+RiNNwiPv7mgcXNkxbUWwgKBrIzzJvcuLA==
X-Received: by 2002:adf:ec48:: with SMTP id w8-v6mr394064wrn.18.1525235235551;
        Tue, 01 May 2018 21:27:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.160.10 with SMTP id j10ls1354740wme.6.gmail; Tue, 01 May
 2018 21:27:13 -0700 (PDT)
X-Received: by 10.28.134.69 with SMTP id i66mr11937898wmd.40.1525235233643;
        Tue, 01 May 2018 21:27:13 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1525235233; cv=none;
        d=google.com; s=arc-20160816;
        b=RcAHzx4SOQepL6RH488pXfDsWRxkZtZqrzMFKMkLbLKj6mYx+Bqt/Y9MDguYQj4EcI
         nVKJiAW/7l6kWXZVinJXR7C8Z4qrKyN7xK3TnyQerMhusIkThOg4Ala26ed/XTOCaETW
         ACwTohK2skMkkhN1VdXf31U+q2dQBzbPWlrw1r8GzUXEgP70z5lNTwbEJ1GKjvhkXjQJ
         2hIPfJD0/VRkWIjuE7z6L61FxFpZPZYbJFuBN/9FOTmgMnKZzoDdMY5YUkZj+mn6rxtS
         HCtoyy3YXoNKPRHdQzD8ub3izC7sVEEf4ORKCjhScBxilQqC/trgdzu95OCK0OxAF12E
         zzKg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=jaFgymy5aTB2xd7SR68tI65SsSJOYSGLCyXN+PrFu5g=;
        b=BS7qoAxpMRwcRR9JZrlTekRISfg9LVINLGTMiGodgt7yNFN5ZByyzd1/R2aE4thW8D
         C+Lz3hzhqvjCpl20GHefYK+5OgOeV7plCUqBTkqCx/p2zt6DK3xm25YuNL8I4ReNrAmf
         9nRFBYCDV4sRxdekiHD1/dz3DNQwK9CPG6AEQkAJu6mzRSDeD9nhgbWKBTaMs0behlZB
         QhaIO0k6PGotG1JKtyOMPHT/SMX9neI5YGq+kHDfnqOKu7a5R+BnbokBRnhpIcu8VC5X
         MhPu6ZNdLH9lZuJqY+4aai6fD16cewzdjcE4ZxaKfStJs6fcbwmOkDlKyO49fZ+jRjps
         VMVw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@metafoo.co.uk header.s=default header.b=NuS2XgtM;
       spf=neutral (google.com: 81.27.85.19 is neither permitted nor denied by best guess record for domain of richard@metafoo.co.uk) smtp.mailfrom=richard@metafoo.co.uk
Original-Received: from uk12.easy-internet.co.uk (uk12.easy-internet.co.uk. [81.27.85.19])
        by mx.google.com with ESMTPS id o187si6308528wmd.139.2018.05.01.21.27.13
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 01 May 2018 21:27:13 -0700 (PDT)
Received-SPF: neutral (google.com: 81.27.85.19 is neither permitted nor denied by best guess record for domain of richard@metafoo.co.uk) client-ip=81.27.85.19;
Original-Received: from mail-ot0-f176.google.com ([74.125.82.176]:33508)
	by uk12.easy-internet.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
	(Exim 4.89_1)
	(envelope-from <richard@metafoo.co.uk>)
	id 1fDjMD-0003cs-HK
	for std-proposals@isocpp.org; Wed, 02 May 2018 05:27:11 +0100
Original-Received: by mail-ot0-f176.google.com with SMTP id l22-v6so15135233otj.0
        for <std-proposals@isocpp.org>; Tue, 01 May 2018 21:27:10 -0700 (PDT)
X-Received: by 2002:a9d:282d:: with SMTP id m42-v6mr13370002otb.64.1525235229710;
 Tue, 01 May 2018 21:27:09 -0700 (PDT)
Original-Received: by 10.74.67.193 with HTTP; Tue, 1 May 2018 21:26:49 -0700 (PDT)
In-Reply-To: <cab4cada-1abe-48b2-9a4b-d6c9f994b805@isocpp.org>
X-Gmail-Original-Message-ID: <CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0xOFy+u0jQEtFnOw@mail.gmail.com>
X-OutGoing-Spam-Status: No, score=0.1
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - uk12.easy-internet.co.uk
X-AntiAbuse: Original Domain - isocpp.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - metafoo.co.uk
X-Get-Message-Sender-Via: uk12.easy-internet.co.uk: authenticated_id: metafooc/from_h
X-Authenticated-Sender: uk12.easy-internet.co.uk: richard@metafoo.co.uk
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@metafoo.co.uk header.s=default header.b=NuS2XgtM;       spf=neutral
 (google.com: 81.27.85.19 is neither permitted nor denied by best guess record
 for domain of richard@metafoo.co.uk) smtp.mailfrom=richard@metafoo.co.uk
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>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:38038
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38038>

--00000000000010e017056b3180f8
Content-Type: text/plain; charset="UTF-8"

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0289r0.pdf

The paper received some support from evolution. Some felt that the right
answer was to wait for Modules. As noted in the above paper there are some
open questions as to how this would actually work if we went forward with
it.

On 1 May 2018 at 19:26, Phil Bouchard <philippeb8@gmail.com> wrote:

> Greetings,
>
> In the development of the "Fornux C++ Superset" source-to-source compiler
> and its Open Source memory manager counterpart "root_ptr":
> https://github.com/philippeb8/root_ptr
>
> Like previously mentioned I noticed the following problems with the C++
> language:
> - There is no distinction between a pointer and an iterator.
> - There is no distinction between pointers to arrays of derived classes
> and pointers to arrays of base classes.
>
> But I just realized the following also:
> - The C++ language disallows top-level forward declarations of nested
> classes.
>
> The latter becomes a problem if you want to, for example, specialize
> metadata template classes. Ex:
>
> struct A
> {
>     struct B
>     {};
> };
>
> The transpiler will generate:
>
> struct A::B;
>
> namespace metadata
> {
>     template <>
>         struct construct<A::B>
>         {
>             template <typename... Args>
>                 A::B operator () (Args const &... args);
>         };
> }
>
> But the problem is the following statement is not legal:
> struct A::B;
>
> So nested structures aren't commutative with template specializations
> which makes it impossible to generate metadata on-the-fly. The problem was
> always omnipresent but now it causes important problems in this case but
> also prevents further extensions of the language.
>
> It's just a matter of making C++ less strict in this case...
>
>
> Regards,
> -Phil
>
> --
> 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/cab4cada-1abe-48b2-
> 9a4b-d6c9f994b805%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/cab4cada-1abe-48b2-9a4b-d6c9f994b805%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0xOFy%2Bu0jQEtFnOw%40mail.gmail.com.

--00000000000010e017056b3180f8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">See <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs=
/papers/2016/p0289r0.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/paper=
s/2016/p0289r0.pdf</a><br><div><br></div><div>The paper received some suppo=
rt from evolution. Some felt that the right answer was to wait for Modules.=
 As noted in the above paper there are some open questions as to how this w=
ould actually work if we went forward with it.</div></div><div class=3D"gma=
il_extra"><br><div class=3D"gmail_quote">On 1 May 2018 at 19:26, Phil Bouch=
ard <span dir=3D"ltr">&lt;<a href=3D"mailto:philippeb8@gmail.com" target=3D=
"_blank">philippeb8@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">Greetings,<div><br></div><div>In the developmen=
t of the &quot;Fornux C++ Superset&quot; source-to-source compiler and its =
Open Source memory manager counterpart &quot;root_ptr&quot;:</div><div><a h=
ref=3D"https://github.com/philippeb8/root_ptr" target=3D"_blank">https://gi=
thub.com/philippeb8/<wbr>root_ptr</a><br></div><div><br></div><div>Like pre=
viously mentioned I noticed the following problems with the C++ language:</=
div><div>- There is no distinction between a pointer and an iterator.</div>=
<div>- There is no distinction between pointers to arrays of derived classe=
s and pointers to arrays of base classes.</div><div><br></div><div>But I ju=
st realized the following also:</div><div>- The C++ language disallows top-=
level forward declarations of nested classes.</div><div><br></div><div>The =
latter becomes a problem if you want to, for example, specialize metadata t=
emplate classes. Ex:</div><div><br></div><div>struct A</div><div>{</div><di=
v>=C2=A0 =C2=A0 struct B</div><div>=C2=A0 =C2=A0 {};</div><div>};</div><div=
><br></div><div>The transpiler will generate:</div><div><br></div><div><div=
>struct A::B;</div><div><br></div><div>namespace metadata</div><div>{</div>=
<div>=C2=A0 =C2=A0 template &lt;&gt;<br></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 struct construct&lt;A::B&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 {</d=
iv><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 template &lt;typename... =
Args&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
A::B operator () (Args const &amp;... args);</div><div>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 };<br></div><div>}</div></div><div><br></div><div>But the problem i=
s the following statement is not legal:</div><div>struct A::B;<br></div><di=
v><br></div><div>So nested structures aren&#39;t commutative with template =
specializations which makes it impossible to generate metadata on-the-fly. =
The problem was always omnipresent but now it causes important problems in =
this case but also prevents further extensions of the language.=C2=A0</div>=
<div><br></div><div>It&#39;s just a matter of making C++ less strict in thi=
s case...</div><div><br></div><div><br></div><div>Regards,</div><div>-Phil<=
/div></div><span class=3D"HOEnZb"><font color=3D"#888888">

<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" target=3D"_=
blank">std-proposals+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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/cab4cada-1abe-48b2-9a4b-d6c9f994b805%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/cab4=
cada-1abe-48b2-<wbr>9a4b-d6c9f994b805%40isocpp.org</a><wbr>.<br>
</font></span></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/CAOfiQqnoN-_KQ-AOTsAMCMnJK_nge1c59K0x=
OFy%2Bu0jQEtFnOw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqnoN-_KQ-=
AOTsAMCMnJK_nge1c59K0xOFy%2Bu0jQEtFnOw%40mail.gmail.com</a>.<br />

--00000000000010e017056b3180f8--

.
