220 41235 <ea2a691d-f8bb-2d5c-86ce-9515b9f1350f@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: Fri, 7 Dec 2018 10:48:38 -0500
Lines: 73
Approved: news@gmane.org
Message-ID: <ea2a691d-f8bb-2d5c-86ce-9515b9f1350f@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>
 <da76c6e9-93a2-262f-f5dd-e104140dd13a@honermann.net>
 <36e9388e-9b8d-4c93-9a0a-bedfb00c135f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1544197596 10070 195.159.176.226 (7 Dec 2018 15:46:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 7 Dec 2018 15:46:36 +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+bncBDBNXSHG6UDBBWFMVLQAKGQEAL46TFY@isocpp.org Fri Dec 07 16:46:31 2018
Return-path: <std-proposals+bncBDBNXSHG6UDBBWFMVLQAKGQEAL46TFY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it1-f198.google.com ([209.85.166.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDBNXSHG6UDBBWFMVLQAKGQEAL46TFY@isocpp.org>)
	id 1gVIKl-0002XN-Gn
	for gclcip-std-proposals@m.gmane.org; Fri, 07 Dec 2018 16:46:31 +0100
Original-Received: by mail-it1-f198.google.com with SMTP id g7sf5249148itg.7
        for <gclcip-std-proposals@m.gmane.org>; Fri, 07 Dec 2018 07:48:42 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1544197722; cv=pass;
        d=google.com; s=arc-20160816;
        b=Y0Kb6KIUAStcHu89xSYWjWrIij996Rt2Ga5RIACdKrR6zl3j1QfGS32Gu4RIJiJILo
         vJ99flOZS/M+I+xIh5gFWXHuS3lAMNzDyhe8h34V0kDDoLQEP2Z25Gna12nurBaTDlNx
         Gv703AebRdJrQ3q1tCpLatvimYGRtbhp8kAiJzqSDll3B4IoVi4NkFR5F3NCwApMn22u
         +ITkPzrq62c9NdbYsIPeGQdE3tOq5TZ00VvhX+4YAQ7ms/89O/WWyp7QEbUxzuBs/qJL
         5U9FX3GVbkPirPW0EG7QRiYGLbdXnmsB1gHkD2qN3phzP2a4cmpUCVu7R1FqV2hEzJN8
         1BMg==
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
         :content-transfer-encoding:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:cc:to:subject:dkim-signature;
        bh=8FbqNSs/JhfNs2i91llAA7aunHhN8e68etzpfO56Bv4=;
        b=UTvEwyaBSbkzx8eN77n165b13XU6pg7Vx69Tv8A6FFqWKJ0M2RB/QqVuiodlSsRMr+
         haMtxeOfd4TG89W0JkipsipT8yIJlFeubEjubrIFUr2uQmdAVCHBq7ciDc7Z2N+BGxjP
         228Ru5FgaNu43xM3FMkX3mKBk6jYJmQMIqdmLAkUC6tPx77ZOmnJoOpdf+K2xPHxPaMN
         a31AaLyIzwjyDjsszThVzhQTotVYZfQyz/TQHPA7sgaVJXSlOp+dEKGlADXRbm9hcJYT
         j9x5Jb3RhI1Ldr1Zhergin/OaptFrUyCcGY46d3P2bji7YFbdlVJfBV47jInaZfyh3EY
         tO9A==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=LMS9AOys;
       spf=pass (google.com: domain of tom@honermann.net designates 108.166.43.83 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-transfer-encoding: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=8FbqNSs/JhfNs2i91llAA7aunHhN8e68etzpfO56Bv4=;
        b=s7vgWUdWqU89CTHZy8SeneeJ4qZ/gtHN+/GS6+yH3qEWS3V2kuICZqnKoqkZA2yvSm
         rUc8HbySal9hPZUS3RNacOzXWZA2xKGTGNVwit2d8WFtA8R3rfjB+10NZZvzXcU6bs8v
         niM3+H6UX7dvJLgEytAvdBfO7yvmH3Jgf6A3/L0Oa3basLMgpDmn5EJncBdwvKTMbXEb
         2l8JSLOkAobTe5uqeCY2YWa+NyzGGX4W06pSo3UzFMelfch7u6LpuMoeHjVzz0aBkwek
         ddmn0aZ/bg1qIGuAEFUjieKcho6NyCMA6mtpzeVa2OUFPQ4ekVnuFBxrmQ0WQaZ3CgB0
          
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-transfer-encoding
         :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=8FbqNSs/JhfNs2i91llAA7aunHhN8e68etzpfO56Bv4=;
        b=WrPqa3M/biIAMcR7CRZKZ5jH7opK65Id6mYOG8PACpgCl1a81JGAGALo7WomNzHjZe
         jHsPOW8/l6B2xQ81pkmb1LSPgUHQURO/w5Or4mDJeQtvhr2HyRPVzte3CGfcPYNKcQUH
         vxvsv8dXov+nbHV4P/cbxO8/1cFSvWqOLUZPGzyBk8kyq9wy4sXcR3b3OEjov/eXnUb9
         r5qBf8onhM1X8KVHbQ+mWjhvuyv6Z/mzkOx/kzwNEaAClsQaVa4sNsgnx/WeMXYwaVkE
         pOXTv+Wx79l2aWnmDklnGl6ZATdwXLxBjUoPGc7X 
X-Gm-Message-State: AA+aEWZTPZfsfVBb6URDvhqAdJfbNAih/B39DLsqqmtQLstvtPHa/G0T
	IQFoaos7oB9Kk+I2iqkhjqjqUQ==
X-Google-Smtp-Source: AFSGD/VWFYAlqkOWMOYl8akTpbvlMZD7YasNSVRuorT97JuFl017MFuvl+l1/cYqqZ7gbJSINrlF0g==
X-Received: by 2002:a5e:db04:: with SMTP id q4mr1918825iop.30.1544197722005;
        Fri, 07 Dec 2018 07:48:42 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a02:5f48:: with SMTP id r69ls740598jab.2.gmail; Fri, 07 Dec
 2018 07:48:40 -0800 (PST)
X-Received: by 2002:a02:c88:: with SMTP id 8mr2164350jan.87.1544197720455;
        Fri, 07 Dec 2018 07:48:40 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544197720; cv=none;
        d=google.com; s=arc-20160816;
        b=0/98dnTOfj+NMaqgXIIWs5FJPcOtGW1WrHcoHQig67nlowdMN8QV3Liza+5JNVQkTG
         tShtfUmFPLzkSTWS5KmS/xLGmg68REv6R1fP6bzcH+cr03HT3Z+uXLMVn7jnJ3n5cYT/
         inb1lJ4fZQ7eUusm7WJz42pWUpwy8MEpL7E+dONUfUb7q+CIxAg+fdeVVBU178hEhg/q
         vVNfWStTeozI6kVxiqJGlpS1eteaalA+ECQpubMvfTfegKTpL/Z3mWpNzDpyAdCOixqD
         NUOFcg4qyCHqouGB72K4fQbwIARcPWrk2uXg8v/ub8Jl5jufoXhH/1g85nwzUk+oyLLg
         bX/Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:content-transfer-encoding:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:cc:to:subject
         :dkim-signature;
        bh=Yk1CKUlZZOz5sNOH79xJdFjjDT+vtQJVaqhzGk/WTAM=;
        b=0/l2RyUXfW/Bkx4awVa+7OhpKcziDqoT6lqlE5g53ud9haE/f1qEqlwmU8ZwAH1yFG
         Hw6jmf73co+BS7k9Ky7h+qNjC2Iliz+501M+8v4q+x4SknE6TpcRTl3+GQP/JcStRSPq
         QKELMHho+jZSVL8kWdJ8DEMWwvQLhWX+curw0UbOsJwmZ3OoB3d2ObeHIZ60Wbeav1Od
         cg+FnzwRJewrAxZPKfOU4tCv3iM4QvWnWtK/KO5pBJlle64u0zRKcejpGkV4DGfRu/8u
         C3rAQGAIZXcdrZirm/2vpm/z704G+fxPX7xmbXXzHT0vklWiTEvN0J2Sl+4Er91rczLH
         3Bsg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=LMS9AOys;
       spf=pass (google.com: domain of tom@honermann.net designates 108.166.43.83 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
Original-Received: from smtp83.ord1c.emailsrvr.com (smtp83.ord1c.emailsrvr.com. [108.166.43.83])
        by mx.google.com with ESMTPS id i12si1822506iol.27.2018.12.07.07.48.40
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 07 Dec 2018 07:48:40 -0800 (PST)
Received-SPF: pass (google.com: domain of tom@honermann.net designates 108.166.43.83 as permitted sender) client-ip=108.166.43.83;
Original-Received: from smtp19.relay.ord1c.emailsrvr.com (localhost [127.0.0.1])
	by smtp19.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id CB451A05A3;
	Fri,  7 Dec 2018 10:48:39 -0500 (EST)
X-Auth-ID: tom@honermann.net
Original-Received: by smtp19.relay.ord1c.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 7225CA0595;
	Fri,  7 Dec 2018 10:48:39 -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:587 (trex/5.7.12);
	Fri, 07 Dec 2018 10:48:39 -0500
In-Reply-To: <36e9388e-9b8d-4c93-9a0a-bedfb00c135f@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=LMS9AOys;
       spf=pass (google.com: domain of tom@honermann.net designates
 108.166.43.83 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:41235
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41235>

On 12/7/18 12:57 AM, Victor Dyachenko wrote:
> IIRC initially modules were based on some sort of high-level C++ AST=20
> representation - XPR=20
> (https://parasol.tamu.edu/pivot/publications/user-guide.pdf). I'm=20
> talking about Gaby's/VC++ implementation. Do they use different=20
> approach now?

My understanding is that Microsoft is (still) using an internal fork of=20
IPR (https://github.com/GabrielDosReis/ipr).

> A there any people here aware of gcc/clang approach?

Clang uses its own AST serialization format.=C2=A0 It is the same format=20
Clang uses for pre-compiled headers, .ast files, and traditional Clang=20
modules.=C2=A0 These files are Clang specific and not historically compatib=
le=20
across Clang versions.

Gcc is also using its own AST serialization format that reflects gcc's=20
internal AST.=C2=A0 Nathan Sidwell discusses this in some of his talks.=C2=
=A0 You=20
might want to watch his talk from this year's GNU Tools Cauldron=20
(https://www.youtube.com/watch?v=3D5CadIjPRZpM).=C2=A0 He talks about AST=
=20
serialization around the 20 minute mark.

> And if XPR is enough to represent modules interface files (is it?),=20
> can't it be standardized at least in theory?

IPR has limitations.=C2=A0 For example, it does not store full source=20
information nor preprocessor information (no column or macro expansion=20
information).=C2=A0 This means consumers can't accurately map imported=20
constructs back to source code (for example, in diagnostics).

In practice, I don't think something can be standardized here, nor do I=20
think it would be beneficial.=C2=A0 There are competing requirements for ho=
w=20
much data to store (different compilers/tools need different=20
information).=C2=A0 A goal of modules is to improve compile times and a=20
common format would impose overhead relative to what can be accomplished=20
with a highly optimized compiler/tool specific format.=C2=A0 Harder questio=
ns=20
involve implementation defined things.=C2=A0 How would compiler intrinsics=
=20
and language extensions be handled?=C2=A0 How would implementation defined=
=20
behavior in general be handled?=C2=A0 (The standard has many cases where=20
implementation defined behavior can impact the AST).=C2=A0 The committee ha=
s=20
discussed this a number of times and my impression is that there is no=20
consensus for a standard format (though the committee has not actually=20
polled this).

I think a more interesting question is, what would a standard format=20
enable you to do that you wouldn't be able to otherwise? Can we enable=20
those goals in another way?=C2=A0 For example, would implementation specifi=
c=20
tools (potentially defacto industry standards like c++filt) that expose=20
information from module artifacts, potentially in some standard format,=20
be helpful?

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/ea2a691d-f8bb-2d5c-86ce-9515b9f1350f%40honermann=
..net.

.
