220 41233 <da76c6e9-93a2-262f-f5dd-e104140dd13a@honermann.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tom Honermann <tom@honermann.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Modules and preambule, just why?
Date: Thu, 6 Dec 2018 11:16:04 -0500
Lines: 164
Approved: news@gmane.org
Message-ID: <da76c6e9-93a2-262f-f5dd-e104140dd13a@honermann.net>
References: <e3f7a8a5-8e78-49f5-97df-139951f5d07a@isocpp.org>
 <CAOU91OPMe-0PU7zEfKKPSQNMwtaf8cw+q24XAes9pZTJqPGrcg@mail.gmail.com>
 <16989401-2f0d-4200-997e-0ac60b47bec3@isocpp.org>
 <CAOU91ONR5v9ujCaM5Riu5Dc39cejV4VcMEdieF3O6b_edy+Y7g@mail.gmail.com>
 <a8310d69-20cb-48ba-8a8e-c62c09d4cd94@isocpp.org>
 <CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m=M7UA8=bf0O3A@mail.gmail.com>
 <08290107-c63b-3ef6-09d4-16c7b6c495ab@honermann.net>
 <CAFk2RUax+i_chjCLEfb7HGitaOtdMSmSmoot4ZTybT_58=4VTQ@mail.gmail.com>
 <0727d34e-0bad-3689-e315-2136bb359e65@honermann.net>
 <41ef0549-4ff9-4d0d-b033-5eb30055490c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------066FFB0FA5943E0A7D6C1194"
X-Trace: blaine.gmane.org 1544112843 23536 195.159.176.226 (6 Dec 2018 16:14:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 6 Dec 2018 16:14:03 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
Cc: ville.voutilainen@gmail.com
To: std-proposals@isocpp.org, Victor Dyachenko <victor.dyachenko@gmail.com>
Original-X-From: std-proposals+bncBDBNXSHG6UDBBRUWUXQAKGQEFEIN74A@isocpp.org Thu Dec 06 17:13:58 2018
Return-path: <std-proposals+bncBDBNXSHG6UDBBRUWUXQAKGQEFEIN74A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io1-f71.google.com ([209.85.166.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDBNXSHG6UDBBRUWUXQAKGQEFEIN74A@isocpp.org>)
	id 1gUwHl-0005xh-8X
	for gclcip-std-proposals@m.gmane.org; Thu, 06 Dec 2018 17:13:57 +0100
Original-Received: by mail-io1-f71.google.com with SMTP id m5sf778544iok.22
        for <gclcip-std-proposals@m.gmane.org>; Thu, 06 Dec 2018 08:16:08 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1544112967; cv=pass;
        d=google.com; s=arc-20160816;
        b=k1kdzlRlapaJVfaCOlsJDzwT+BW/yYH1UOqWuaSRtGnoq8ChVF/wokHYfTtqo85eDi
         dquUQSWCXiKHRtJKUBLjUPnYeL0TDdlRL0hViRXqjmW+PZIKzDI2Bsg2p5niwB1KKYRK
         7txyzoR0APLBheDuGSwEpXY3lFYv3aeffFWXw604b63jvL1cKUzwiwSBkNn7+9b+vvQz
         TZIfK322qHUY5TruYHKlFszQb8kCwwf8Vcm4xHNNWfzTNtFe/aeJ20Lkq+/rbsuYRdHQ
         3k2drJJMBePUx69gwBRv0A2LqbyKx9p7UtRNyxu+TWQcsvLSB2JVarsWzo8tftlMf26w
         xqrA==
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:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :cc:to:subject:dkim-signature;
        bh=wzbV8OSliMk+AdEiUEdnDcxQlrdxbg4fz/YTIx0cAg8=;
        b=V6sU51QapxPMAXammrISJupHMAZ9SDnlvUBH9i7aTJj02xqTegsxywk946LEzIPSjZ
         aVQftz2U4BAV0oOKKaFpEXB/PGLUDjr8lDFFAAcSX6TU+G8WNLz3x6MMQS+zW6Zj+5Uf
         8zNJnMYRCMWUAXJERTzm1LaADLRtyb9Z23btGI/l+Kb91A5a7LPaQbD+EUfGEs564KpO
         JqGARRR9Z8MyoEjfCoPIvvdc0JFjGcFIbjgr9YRX821H+5CTis42cAQwHDFw7e6qJYJn
         Um3Qepu9EU6R8sfPLrEwxfRpSYZanSuqEo8e1WbDT6brJOBBg3piZnNCybg8nfjAdurR
         WYzg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=bOLu1P90;
       spf=pass (google.com: domain of tom@honermann.net designates 184.106.54.107 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:cc:references:from:message-id:date:user-agent
         :mime-version:in-reply-to:content-language: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=wzbV8OSliMk+AdEiUEdnDcxQlrdxbg4fz/YTIx0cAg8=;
        b=wYyvzaBcU7mKLATUu1jd0d4Tqy0cnR0RjtPZzDW6boZBV7OxectGyrqXmNtuJkKfZd
         49fptIQ/oZTdyJgz1mRcUGVMsXAmg/h7wZC8i2kGv6CNSH4yNsVdeaUl2Zeha+iqzi2a
         oi3MVKcr455pQ55gWsaqvoOSv/65Hgj6blNH8c8DsSlndYLpIxlizdRdjw+IPgRFGydX
         jPYAvQrCJfIVM6qLLdP9594GUaE2TD6EzkEplJZr0dNNRJDGA/a9HUdj/axtC2wNdhyF
         kMwKzROj5aWR1LGe2UHaqOSH1Clz4hncIrD+jJVLMo1bLA478/jGqgAVb0shgX9TdGfo
         HAdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:cc:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :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=wzbV8OSliMk+AdEiUEdnDcxQlrdxbg4fz/YTIx0cAg8=;
        b=fMSGM6TFsxhOI9ghemUWcYBqqaVnLs+YbZMGkHcdGnmpLAioa0uprA3SuvaNmRyEMP
         ZGMDFvBaA3jjsrGeniq819cE8QMHA765/sxJiGXFVph8gEaGKY38XV3HXt6VF5zEuTbR
         PyRDK8U8q+pPpWuIkRUckjWRzYPWjXH80dLWRX3SsvsZXoiQf3naGeL7v4ixIeD9wo5u
         qwRqXKxc4YD9HyJwoGFoV0G7Jfb6N0wnxyw+wuhQ9EKh5rU5QiSFoqESBHAIod3vjdoN
         Z9pojHEEpcbxL81oDFiXsLrYbbjytMV9eSFcaC1+g/Nz2sWttnB+9n0pXynO82ZA/4Sq
        
X-Gm-Message-State: AA+aEWbbc4wVBYj4AvtDDvgxrKeTeNBsKRcRXs6TtFlqxzIBs/x38huy
	utG8cS7TswX7Tlu+xnf/uTWwUQ==
X-Google-Smtp-Source: AFSGD/VxMaCMZOuReM5tlEqVLhYAV/qv8A9ZQj50SCA5zjNFTpagE6Ek+kt3UXdVyrCASxclocjHuA==
X-Received: by 2002:a02:3b2b:: with SMTP id c43mr22534233jaa.15.1544112967532;
        Thu, 06 Dec 2018 08:16:07 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a24:695:: with SMTP id 143ls5568012itv.0.gmail; Thu, 06 Dec
 2018 08:16:05 -0800 (PST)
X-Received: by 2002:a24:5f4d:: with SMTP id r74mr19720683itb.170.1544112965914;
        Thu, 06 Dec 2018 08:16:05 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544112965; cv=none;
        d=google.com; s=arc-20160816;
        b=V5srN9xRwumcncVIBu9wmvw8myUMB4GEzMwMv8Q9U2YSGZDHue7iEeC4Hw6QTNZW0u
         WaBf4QN+vBfhl26x7htvAc7F4/Y+CRa5bkYzdkvOhDL/QeIJIPh38qW4c8BDRwYH8eSw
         ClAzvYLWL/lj1syq0aDTqNput/4Z683mHpBJjkoldbpH4nHzTexwFvQnTd+n+V8ZXi9O
         rWlh5LxU31TSbAxY1XwnLAoh0IVtpyLgYDj1G/v7/hFGYGyxesV3OrdN0cxKEv2gs6+V
         VfltzFKe45fwlnYyj0h7WYYTyWVA2PdeOb5KZzTjHLMuPalm9frjPzitbJAs43nSvIcE
         AYoA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:cc:to:subject:dkim-signature;
        bh=SnNCGIMxbz9ZZAbPFWCAqpFVA7TjFdXor/dpftgMnSU=;
        b=zA6EIn9ALPsBEGo9oBHbRAKf9vAHbHcacr+tFnysmDe3BIVtqKN20MRP3pRvWPfw75
         +BYl5eE+nrSJJrA0VozrOEh3PmFcQp/sd1byIpoYrdQYtLMtZafdIBCHPZutsrTMZhOS
         7kfA3ida7HT2s+dVwWVLbFuwSbDvcWEtO6KIIgbCyvDpMG9S7ipIEJq2tfZ2BAN1KJb4
         tF2ZpEBl38cF3v2wo+svOAQVX4A59YuyQa+Jj+dBdQB4e7WEmA81nto+6FCxdqdq3+Rp
         LItsSn79dQPTwBlNaPh2vf03N/ldxrXwwXsuQQulrENPCPnIcqZi3JhEqv/vPjntN/pn
         vF3w==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=bOLu1P90;
       spf=pass (google.com: domain of tom@honermann.net designates 184.106.54.107 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
Original-Received: from smtp107.ord1d.emailsrvr.com (smtp107.ord1d.emailsrvr.com. [184.106.54.107])
        by mx.google.com with ESMTPS id i8si334910ioh.24.2018.12.06.08.16.05
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 06 Dec 2018 08:16:05 -0800 (PST)
Received-SPF: pass (google.com: domain of tom@honermann.net designates 184.106.54.107 as permitted sender) client-ip=184.106.54.107;
Original-Received: from smtp22.relay.ord1d.emailsrvr.com (localhost [127.0.0.1])
	by smtp22.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id 6858CE06AF;
	Thu,  6 Dec 2018 11:16:05 -0500 (EST)
X-Auth-ID: tom@honermann.net
Original-Received: by smtp22.relay.ord1d.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 13E39E06B3;
	Thu,  6 Dec 2018 11:16:04 -0500 (EST)
X-Sender-Id: tom@honermann.net
Original-Received: from [192.168.1.19] (pool-71-176-235-158.rcmdva.fios.verizon.net [71.176.235.158])
	(using TLSv1.2 with cipher AES128-SHA)
	by 0.0.0.0:25 (trex/5.7.12);
	Thu, 06 Dec 2018 11:16:05 -0500
In-Reply-To: <41ef0549-4ff9-4d0d-b033-5eb30055490c@isocpp.org>
Content-Language: en-US
X-Original-Sender: tom@honermann.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@honermann.net header.s=20180930-2j89z3ji header.b=bOLu1P90;
       spf=pass (google.com: domain of tom@honermann.net designates
 184.106.54.107 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
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:41233
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41233>

This is a multi-part message in MIME format.
--------------066FFB0FA5943E0A7D6C1194
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

On 12/6/18 6:38 AM, Victor Dyachenko wrote:
> On Thursday, December 6, 2018 at 7:05:01 AM UTC+3, Tom Honermann wrote:
>
>     Hmm, Gaby has stated many times that .ifc files are not intended for
>     distribution.
>
>
> Really? So what such modules are supposed to be? Yet another=20
> reincarnation of precompiled headers?

I think of them as being very much like precompiled headers with a few=20
additions:

 1. Entities that can't be defined in headers without leading to
    duplicate definition problems (e.g., non-template function
    definitions) can be present in module interface units. Compilation
    of the module interface unit emits such entities to a separate
    object file (that must be linked in somewhere).
 2. Macro containment.
 3. Protection against order of include/import problems.
 4. Protection against name collisions.

>
> And why gcc and clang developers are trying "to define interoperable=20
> changes" (see https://gcc.gnu.org/wiki/cxx-modules) and establish=20
> stable ABI=20
> (https://gcc.gnu.org/wiki/cxx-modules?action=3DAttachFile&do=3Dview&targe=
t=3Dmodule-abi-2017-09-01.pdf)?

The changes referred to in those links concern ABI (primarily name=20
mangling), not portability of module artifacts.=C2=A0 The intent of the ABI=
=20
compatibility is to enable objects/libraries compiled with different=20
compilers to be able to be linked together in a single program.=C2=A0 Such=
=20
compatibility does not extend to module artifacts used at compile-time.

Here is a quote from the second link:

"It is taken as axiomatic that the BMI is generated by the same compiler=20
that compiles any TUs
importing the module. As such, it can conspire to step outside the ABI,=20
where such behavior could not
be observed by other TUs."

I believe that should be read as "by the same installation of the=20
compiler" or, minimally, the same version.

Tom.

--=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/da76c6e9-93a2-262f-f5dd-e104140dd13a%40honermann=
..net.

--------------066FFB0FA5943E0A7D6C1194
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">On 12/6/18 6:38 AM, Victor Dyachenko
      wrote:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:41ef0549-4ff9-4d0d-b033-5eb30055490c@isocpp.org">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
      <div dir=3D"ltr">On Thursday, December 6, 2018 at 7:05:01 AM UTC+3,
        Tom Honermann wrote:
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hmm,
          Gaby has stated many times that .ifc files are not intended
          for <br>
          distribution.=C2=A0 <br>
        </blockquote>
        <div><br>
        </div>
        <div>Really? So what such modules are supposed to be? Yet
          another reincarnation of precompiled headers?</div>
      </div>
    </blockquote>
    <p>I think of them as being very much like precompiled headers with
      a few additions:</p>
    <ol>
      <li>Entities that can't be defined in headers without leading to
        duplicate definition problems (e.g., non-template function
        definitions) can be present in module interface units.=C2=A0
        Compilation of the module interface unit emits such entities to
        a separate object file (that must be linked in somewhere).</li>
      <li>Macro containment.</li>
      <li>Protection against order of include/import problems.</li>
      <li>Protection against name collisions.<br>
      </li>
    </ol>
    <blockquote type=3D"cite"
      cite=3D"mid:41ef0549-4ff9-4d0d-b033-5eb30055490c@isocpp.org">
      <div dir=3D"ltr">
        <div><br>
        </div>
        <div>And why gcc and clang developers are trying "to define
          interoperable changes" (see
          <a class=3D"moz-txt-link-freetext" href=3D"https://gcc.gnu.org/wi=
ki/cxx-modules">https://gcc.gnu.org/wiki/cxx-modules</a>) and establish sta=
ble ABI
(<a class=3D"moz-txt-link-freetext" href=3D"https://gcc.gnu.org/wiki/cxx-mo=
dules?action=3DAttachFile&amp;do=3Dview&amp;target=3Dmodule-abi-2017-09-01.=
pdf">https://gcc.gnu.org/wiki/cxx-modules?action=3DAttachFile&amp;do=3Dview=
&amp;target=3Dmodule-abi-2017-09-01.pdf</a>)?</div>
      </div>
    </blockquote>
    <p>The changes referred to in those links concern ABI (primarily
      name mangling), not portability of module artifacts.=C2=A0 The intent
      of the ABI compatibility is to enable objects/libraries compiled
      with different compilers to be able to be linked together in a
      single program.=C2=A0 Such compatibility does not extend to module
      artifacts used at compile-time.<br>
    </p>
    <p>Here is a quote from the second link:</p>
    <p>"It is taken as axiomatic that the BMI is generated by the same
      compiler that compiles any TUs <br>
      importing the module. As such, it can conspire to step outside the
      ABI, where such behavior could not <br>
      be observed by other TUs."</p>
    <p>I believe that should be read as "by the same installation of the
      compiler" or, minimally, the same version.<br>
    </p>
    <p>Tom.<br>
    </p>
  </body>
</html>

<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/da76c6e9-93a2-262f-f5dd-e104140dd13a%=
40honermann.net?utm_medium=3Demail&utm_source=3Dfooter">https://groups.goog=
le.com/a/isocpp.org/d/msgid/std-proposals/da76c6e9-93a2-262f-f5dd-e104140dd=
13a%40honermann.net</a>.<br />

--------------066FFB0FA5943E0A7D6C1194--

.
