220 29228 <CAKiZDp2g8Hhb4cKEBmn2HAUE1mb5YP-gpZktwTb6310mCDQivA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Patrice Roy <patricer@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: [RFC] #pragma once... yes, really...
 (concrete proposal)
Date: Fri, 28 Oct 2016 21:04:15 -0400
Lines: 194
Approved: news@gmane.org
Message-ID: <CAKiZDp2g8Hhb4cKEBmn2HAUE1mb5YP-gpZktwTb6310mCDQivA@mail.gmail.com>
References: <58122C8D.9060205@gmail.com> <8422f73d-e04f-49e4-aede-0399cd4d01db@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f403045e2f12c17c96053ff68dee
X-Trace: blaine.gmane.org 1477703068 3709 195.159.176.226 (29 Oct 2016 01:04:28 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 29 Oct 2016 01:04:28 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDSZXMHWZIKBBEHLZ7AAKGQEWMH26JQ@isocpp.org Sat Oct 29 03:04:23 2016
Return-path: <std-proposals+bncBDSZXMHWZIKBBEHLZ7AAKGQEWMH26JQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDSZXMHWZIKBBEHLZ7AAKGQEWMH26JQ@isocpp.org>)
	id 1c0I4F-0007gI-5z
	for gclcip-std-proposals@m.gmane.org; Sat, 29 Oct 2016 03:04:15 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id u124sf139770097ywg.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 28 Oct 2016 18:04:18 -0700 (PDT)
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=rHO6HmV7KGfHPXT3w2Yjq7ISqZDjhD55oPaCrsImJNU=;
        b=TdnWjKoM5nmyQMSVgeGBNCZ3UDro8O9e9In+icAMfFLPsayQwLq1YYaCSUS/bsDoKg
         bz2W8DC7HHhTD/jiyW5FAxviVkLjbVB/HohnBaSFT1eMjFLEPzNiQJeYmhHJIPnsZc9A
         h2Vrzh6HPx9jOH3XOf5he8TC0CgD65JbpYCY9ztIPJkLz40wlVRw+j2wnbhWfWEMAM0Z
         C4QMehDP0NpLoD7NiBqLuVqY4A4G9D1fqpjITDgt6zdrBYjW2vukaG1ig6AF3N3bD3cX
         x7EifkiyN/tQAfurymNvJfWAN82sksCMhb3dUMEa9vicxPq5ihm3sydr+dnuf7Qqa6MJ
         doyw==
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: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=rHO6HmV7KGfHPXT3w2Yjq7ISqZDjhD55oPaCrsImJNU=;
        b=HKoxIE0WfEfXbvLjrZRsHAqqzxhIjaIColsbYn7XXpene/KR/V+IdCkgibGHT5xi2N
         gY3D0pvf7hsSWU0HZRgLpfokAYAhDDDIEEvuseDLcp9hxBHyPA6vArBB6nTD6H3dPuQG
         2XxoQHZk0g2S9xWWblCtvgYFt/tLo3K3eGMtl8U2vGqqpPalroA+lTVwyfsZ+D0IdGcL
         KRKIcCzmKui1YAyZ1+Nz/q5zDV32jfzlT0Cq/grD/RW8f5rj/fax9GLd7KxXn7zmlCgn
         WYRPZcXad2zkl7r1RXWGBjmWlW9uOaA25QovXyQczY5DJQVbydDtlSFOS2AEIvCJsoa6
         5k8w==
X-Gm-Message-State: ABUngveA4SBnQIRn3XrGgJzlvKtxw1cHc3fp1eW5JOROH3zJFQTCeFCsJwTJBzX8f1fpdA==
X-Received: by 10.129.82.130 with SMTP id g124mr799868ywb.152.1477703057606;
        Fri, 28 Oct 2016 18:04:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.15.174 with SMTP id d43ls774654otd.11.gmail; Fri, 28 Oct
 2016 18:04:16 -0700 (PDT)
X-Received: by 10.159.48.21 with SMTP id h21mr15221127uab.39.1477703056786;
        Fri, 28 Oct 2016 18:04:16 -0700 (PDT)
Original-Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com. [2607:f8b0:400c:c08::22a])
        by mx.google.com with ESMTPS id l26si4083416uaa.230.2016.10.28.18.04.16
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Oct 2016 18:04:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of patricer@gmail.com designates 2607:f8b0:400c:c08::22a as permitted sender) client-ip=2607:f8b0:400c:c08::22a;
Original-Received: by mail-ua0-x22a.google.com with SMTP id 12so67313293uas.2
        for <std-proposals@isocpp.org>; Fri, 28 Oct 2016 18:04:16 -0700 (PDT)
X-Received: by 10.176.16.78 with SMTP id g14mr13752877uab.5.1477703056324;
 Fri, 28 Oct 2016 18:04:16 -0700 (PDT)
Original-Received: by 10.176.85.89 with HTTP; Fri, 28 Oct 2016 18:04:15 -0700 (PDT)
In-Reply-To: <8422f73d-e04f-49e4-aede-0399cd4d01db@isocpp.org>
X-Original-Sender: patricer@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of patricer@gmail.com
 designates 2607:f8b0:400c:c08::22a as permitted sender) smtp.mailfrom=patricer@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:29228
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29228>

--f403045e2f12c17c96053ff68dee
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I've exchanged with others on this topic in the past and their positions
were similar to Arthur's : they were actually worried that any proposed
standard solution to this problem would deviate from existing (#pragma
once) practice, which I understand (even though I personally prefer -- and
use -- include guards, reserving #pragma for actual non-portable cases).

This should not stop anyone from sumbitting solutions or =C2=ABsolutions=C2=
=BB to the
problem, but I thought it would be nice to know there would be resistance.

2016-10-28 17:52 GMT-04:00 Arthur O'Dwyer <arthur.j.odwyer@gmail.com>:

> On Thursday, October 27, 2016 at 9:34:25 AM UTC-7, Matthew Woehlke wrote:
>>
>> After the recent thread rehashing this yet again, I'm sure some folks
>> will be surprised to see me on the other side of the issue. However, all
>> the noise got me to thinking how we might actually do this correctly...
>>
>> This is *not* a proposal for *unqualified* `#pragma once` [...]
>>
>
> I'm not a Committee member, but if I were, I would strongly oppose any
> proposal that tried to solve the "#pragma once" problem in any way other
> than:
> (1) Standardizing existing vendor practice, i.e., #pragma once; or
> (2) Helping to move the Modules proposal more quickly toward
> standardization.
>
> Remember, ordinary programmers (such as myself) can already use "#pragma
> once" with every C or C++ compiler we encounter in daily practice. Relyin=
g
> on "#pragma once" is no weirder than relying on ,##__VA_ARGS__
> <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2023.pdf>[a] or system
> include paths or __builtin_unreachable() or -Wall -Werror or any of the
> other things we use in our daily practice that have been "standardized"
> only by vendors, not by ISO.
>
> Include-guards and #pragma once were originally invented to solve a
> problem (breakage from double-inclusion) that in the medium term here wil=
l
> be solved by the Modules proposal, rendering the two existing solutions
> obsolete. I strongly encourage anyone currently dealing with
> double-inclusion problems to either:[b]
> (1) Adopt the existing ISO Standard solution (include guards); or
> (2) Adopt the existing solution documented by your compiler vendor
> (#pragma once); or
> (3) Adopt and/or pitch in and/or wait eagerly for the
> soon-to-be-ISO-Standard solution (the Modules draft TS
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4610.pdf>).
>
> Creating a *third* *legacy* solution to the double-inclusion problem
> doesn't help anyone, least of all the ordinary programmers who are just
> trying to figure out the best practice and use it to do their daily work.
> [c]
>
> =E2=80=93Arthur
>
> [a] My kudos to Thomas K=C3=B6ppe for attempting to standardize existing
> practice in N2023
> <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2023.pdf> instead of
> inventing a new thing.
> [b] If you use any third-party headers, you have already done either (1)
> or (2) anyway, whether you know it or not. (And you've probably done
> *both*.)
> [c] As usual, there is an XKCD for this. <https://xkcd.com/927/>
>
> --
> 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/8422f73d-e04f-49e4-
> aede-0399cd4d01db%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8422f73d-e0=
4f-49e4-aede-0399cd4d01db%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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/CAKiZDp2g8Hhb4cKEBmn2HAUE1mb5YP-gpZktwTb6310mCDQ=
ivA%40mail.gmail.com.

--f403045e2f12c17c96053ff68dee
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I&#39;ve exchanged with others on this topic in the p=
ast and their positions were similar to Arthur&#39;s : they were actually w=
orried that any proposed standard solution to this problem would deviate fr=
om existing (#pragma once) practice, which I understand (even though I pers=
onally prefer -- and use -- include guards, reserving #pragma for actual no=
n-portable cases).<br><br></div>This should not stop anyone from sumbitting=
 solutions or =C2=ABsolutions=C2=BB to the problem, but I thought it would =
be nice to know there would be resistance.<br></div><div class=3D"gmail_ext=
ra"><br><div class=3D"gmail_quote">2016-10-28 17:52 GMT-04:00 Arthur O&#39;=
Dwyer <span dir=3D"ltr">&lt;<a href=3D"mailto:arthur.j.odwyer@gmail.com" ta=
rget=3D"_blank">arthur.j.odwyer@gmail.com</a>&gt;</span>:<br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><span class=3D"">On Thursday, October 27,=
 2016 at 9:34:25 AM UTC-7, Matthew Woehlke wrote:</span><blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><span class=3D"">After the recent thread rehashing t=
his yet again, I&#39;m sure some folks
<br>will be surprised to see me on the other side of the issue. However, al=
l
<br>the noise got me to thinking how we might actually do this correctly...
<br>
<br></span>This is *not* a proposal for *unqualified* `#pragma once` [...]=
=C2=A0<br></blockquote><div><br></div><div>I&#39;m not a Committee member, =
but if I were, I would strongly oppose any proposal that tried to solve the=
 &quot;#pragma once&quot; problem in any way other than:</div><div>(1) Stan=
dardizing existing vendor practice, i.e., #pragma once; or</div><div>(2) He=
lping to move the Modules proposal more quickly toward standardization.</di=
v><div><br></div><div>Remember, ordinary programmers (such as myself) can a=
lready use &quot;#pragma once&quot; with every C or C++ compiler we encount=
er in daily practice. Relying on &quot;#pragma once&quot; is no weirder tha=
n relying on <font face=3D"courier new, monospace"><a href=3D"http://www.op=
en-std.org/jtc1/sc22/wg14/www/docs/n2023.pdf" target=3D"_blank">,##__VA_ARG=
S__</a></font><font size=3D"1">[a]</font> or system include paths or <font =
face=3D"courier new, monospace">__builtin_unreachable()</font> or <font fac=
e=3D"courier new, monospace">-Wall -Werror</font> or any of the other thing=
s we use in our daily practice that have been &quot;standardized&quot; only=
 by vendors, not by ISO.</div><div><br></div><div>Include-guards and #pragm=
a once were originally invented to solve a problem (breakage from double-in=
clusion) that in the medium term here will be solved by the Modules proposa=
l, rendering the two existing solutions obsolete. I strongly encourage anyo=
ne currently dealing with double-inclusion problems to either:<font size=3D=
"1">[b]</font></div><div>(1) Adopt the existing ISO Standard solution (incl=
ude guards); or</div><div>(2) Adopt the existing solution documented by you=
r compiler vendor (#pragma once); or</div><div>(3) Adopt and/or pitch in an=
d/or wait eagerly for the soon-to-be-ISO-Standard solution (<a href=3D"http=
://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4610.pdf" target=3D"_b=
lank">the Modules draft TS</a>).</div><div><br></div><div>Creating a <b>thi=
rd</b>=C2=A0<i>legacy</i> solution to the double-inclusion problem doesn&#3=
9;t help anyone, least of all the ordinary programmers who are just trying =
to figure out the best practice and use it to do their daily work.<font siz=
e=3D"1">[c]</font></div><div><br></div><div>=E2=80=93Arthur</div><div><br><=
/div><div>[a] My kudos to Thomas K=C3=B6ppe for attempting to standardize e=
xisting practice in <a href=3D"http://www.open-std.org/jtc1/sc22/wg14/www/d=
ocs/n2023.pdf" target=3D"_blank">N2023</a> instead of inventing a new thing=
..<br></div><div><div>[b] If you use any third-party headers, you have alrea=
dy done either (1) or (2) anyway, whether you know it or not. (And you&#39;=
ve probably done=C2=A0<i>both</i>.)</div></div><div><div>[c] As usual,=C2=
=A0<a href=3D"https://xkcd.com/927/" target=3D"_blank">there is an XKCD for=
 this.</a></div></div><div><br></div></div><span class=3D"">

<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></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8422f73d-e04f-49e4-aede-0399cd4d01db%=
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/8422=
f73d-e04f-49e4-<wbr>aede-0399cd4d01db%40isocpp.org</a><wbr>.<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/CAKiZDp2g8Hhb4cKEBmn2HAUE1mb5YP-gpZkt=
wTb6310mCDQivA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp2g8Hhb4cKE=
Bmn2HAUE1mb5YP-gpZktwTb6310mCDQivA%40mail.gmail.com</a>.<br />

--f403045e2f12c17c96053ff68dee--

.
