220 41224 <08290107-c63b-3ef6-09d4-16c7b6c495ab@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: Wed, 5 Dec 2018 16:43:44 -0500
Lines: 35
Approved: news@gmane.org
Message-ID: <08290107-c63b-3ef6-09d4-16c7b6c495ab@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>
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
X-Trace: blaine.gmane.org 1544046101 15945 195.159.176.226 (5 Dec 2018 21:41:41 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Dec 2018 21:41:41 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
To: std-proposals@isocpp.org, Ville Voutilainen <ville.voutilainen@gmail.com>
Original-X-From: std-proposals+bncBDBNXSHG6UDBBEMNUHQAKGQEANAZSKA@isocpp.org Wed Dec 05 22:41:36 2018
Return-path: <std-proposals+bncBDBNXSHG6UDBBEMNUHQAKGQEANAZSKA@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+bncBDBNXSHG6UDBBEMNUHQAKGQEANAZSKA@isocpp.org>)
	id 1gUevI-00043n-76
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Dec 2018 22:41:36 +0100
Original-Received: by mail-io1-f71.google.com with SMTP id m5sf21814633iok.22
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Dec 2018 13:43:47 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1544046226; cv=pass;
        d=google.com; s=arc-20160816;
        b=QLQDZVhF/4j0t/fBayN+DW+S2/49w/F3Rdlr84HucDS0pHESVznT02JuhjzbpcB5o+
         KVQOgCd3icrEvC1FITy1CJ5XJRtMTmxVgwSb8bU3vo3aX91KM1eM6Asg3imqC/lHvTnd
         2o2wDg2Wl8vEKyFCv3Dzo3EmTPRqQz9Y6OWK2ewPRVdS8rYCWB6gWjuIT5rdzKjtk9q5
         oIFHJ7nOXpTWFbx+S0hK+5DbwceySLiHWnQp7toxGDsHS1qSdssLpOAwZ1WXZjUSiq1k
         aKDxR368IIHmlud7mDwp2VNsO7DIHLT5fvTvKp7I0YM1qRGDusq1Q/nZ432lpun5amEw
         ao4A==
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
         :to:subject:dkim-signature;
        bh=5ShqlR590spqQvNC+sGsFUwIwaacFxTV6ZytgbSWhxk=;
        b=0cXqP81mKemNWtRrbxYpR2JWqhDEXMRSB+q1WMM+U2BU7Wg7JXyFQIo9chAuP+patC
         U0ThsxQa5O/NlIZyK26/VOe6fpP79MdM36PtTKvxEgWHE1Kcl8RGNFgyWNSekYLOpd1u
         wsfFT7GRv9sX7YzzE84dKN0RUyOQhinS+4FX12UXCRSf3L9xjSZbQKGiltQEK3wFbtKc
         hYTUrrOFZlLFmPBVCjXV/0Gt1O71a0wyPMh7AekL2b1zU6yy+95qmj/hdDsk1h74Wogo
         NUUNR0PitOWeQht/qGmKnE3avTtXnEvZYUULewmNIjrwIvPQeqh8gBFL36DKkzhLPP4U
         pawA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=kDMKUHnU;
       spf=pass (google.com: domain of tom@honermann.net designates 184.106.54.99 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: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=5ShqlR590spqQvNC+sGsFUwIwaacFxTV6ZytgbSWhxk=;
        b=i7MCUzDUDTIhaXVElMiXMkZNz11SBt+34O2X8Sp/9brt4bttwboCbq21dr5oprkP0b
         LNVEU/AN9FPLUMdNAqmOhvezgELH2MeednMqRCmGLcW4pI1yrho5Ad3VOWyz94+FbOab
         eT0fbL8UyHXwIns5i7klUplRKq1XFxoDSltBNc5Updkrb/DsX7FYU/x/ChMTPIPO8DNu
         1fKZHtR018swYYcs1aUJQT0NDFuwOZUvRcCTlPCy+cbkFCOFte/wyaPCla6dDAv3SaoE
         KRElf12As/lCEO3UzRban6LjsbVVc24qg4FrAsugHJ5PS5nvxhi/9zaPV3fROKqGCPc4
         e0Yg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to: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=5ShqlR590spqQvNC+sGsFUwIwaacFxTV6ZytgbSWhxk=;
        b=RDuUa03UHv4/U6jHtc8AoYB5/NPfQ6acoGFWqmDiSZ+H843YIzc2Tfk4RSB5Rw+fHC
         NCDz1BzyXf3jn4Aq8XpwYFqH0FfNw6zzzEj2Ub9RKkfHEFzKqSBdHAetkmSWXjGMbNgS
         keaI49cbQm8yh9Djs5XQ/jR6uFPw3PGi6IEJhUnA1TTmvUTSpSjQbEsSmCGuRmcJDNFV
         5633ffrwfmeW0+zkEliFnh1rFsqXHWJW/3k6fr+mo2jRIdK7ASLEHofduaKVSgC/uw1H
         GZBCMM7DdoQH13k7/RSTJznt5gp4bszeuj3VkK7VBdXGZFprHLtJ7BC8S9M764FoRonu
         0 
X-Gm-Message-State: AA+aEWam8Hyj9KiVsiHHTDImL+rJB+0PORk0oO7wbGxa1m9WyxrUqcS3
	Z6GF1XUevLTnvM5A1myTGP2/ow==
X-Google-Smtp-Source: AFSGD/WxaT0XLXt9rnuRQB35A9Cjn1PEGF7S7KCvO7MT0dJEhesod0viCy716aSJM/Hs5Fqr23WaDA==
X-Received: by 2002:a02:c55:: with SMTP id g82mr20068469jad.17.1544046226579;
        Wed, 05 Dec 2018 13:43:46 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a5d:8d0c:: with SMTP id p12ls985446ioj.3.gmail; Wed, 05 Dec
 2018 13:43:45 -0800 (PST)
X-Received: by 2002:a6b:a0d:: with SMTP id z13mr21766315ioi.57.1544046225339;
        Wed, 05 Dec 2018 13:43:45 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544046225; cv=none;
        d=google.com; s=arc-20160816;
        b=SOUVBpaSP6XKNP/BN5z65o0eNDEXz5Q+X1xm+ewJwWZ4JBUcNNfHdQHLx3r87zXgQQ
         IpwWKGdtcRoap7JYydk1W9BP5ljTcRd50USrird/rtAdNc8XBnHYa6pKshgodb+khWKF
         bBaMQ1ztHA7gZFF1Yy4lSfAH/f4ZzHuMe3vuEaNzLRbGWq9eqDDU28DD/SwgqtmS5A1J
         WkU78PsWnqqgz+XeJ+/cIMrf0ZwUakwCygXVgPgjAP/ONURY/PskgDEdpdSJ4w0H8/MT
         QD2+BfB/zDMlVD/vRBRg9pMl5/yvURb5fhwRSlipAgr6Ox2DthjkWYQy+Ajs3rcqAZo1
         vFEg==
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:to:subject
         :dkim-signature;
        bh=VBq1P8CuLHaAiOh9aNH3Qck7WK7g2TBHmcWePaSn/zw=;
        b=Fh+yEqwgMlEEQ2FBUzX/mEoV0cRyuPCWAGJoRpUwmSoQhL+rC7+gWuPi4XbPEQl8Bw
         r1gx5XIRGq2UTQepM08yqNxRCb+kfGSO/KTRxCw2TbJU1/uRIgofXNpm2yFKPfhgLk7L
         h4nM9k9ArWnSshDfgr4EfgJQ/oMjXzAZO2ZKMY4wA93UHYfYac3+iQhes7iVltfh+oks
         lK1AtoDpAOIOeiC9HviQHVNcbhC9OJzjN38YCj1V3dnwBTBzgByP9BDfINH5Lk7tffTa
         xCvRuUA9y24on6Dfc5cZP4r4bHt1rN4l0E8LA1Mb3WCWTuJrWCChYtBEoS/wplmtRsp8
         D5Fg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=kDMKUHnU;
       spf=pass (google.com: domain of tom@honermann.net designates 184.106.54.99 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
Original-Received: from smtp99.ord1d.emailsrvr.com (smtp99.ord1d.emailsrvr.com. [184.106.54.99])
        by mx.google.com with ESMTPS id r205si8573299itd.33.2018.12.05.13.43.45
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 05 Dec 2018 13:43:45 -0800 (PST)
Received-SPF: pass (google.com: domain of tom@honermann.net designates 184.106.54.99 as permitted sender) client-ip=184.106.54.99;
Original-Received: from smtp21.relay.ord1d.emailsrvr.com (localhost [127.0.0.1])
	by smtp21.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id CF2E4603D1;
	Wed,  5 Dec 2018 16:43:44 -0500 (EST)
X-Auth-ID: tom@honermann.net
Original-Received: by smtp21.relay.ord1d.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 8CA046027C;
	Wed,  5 Dec 2018 16:43:44 -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);
	Wed, 05 Dec 2018 16:43:44 -0500
In-Reply-To: <CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m=M7UA8=bf0O3A@mail.gmail.com>
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=kDMKUHnU;
       spf=pass (google.com: domain of tom@honermann.net designates
 184.106.54.99 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:41224
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41224>

On 12/5/18 2:01 PM, Ville Voutilainen wrote:
> On Wed, 5 Dec 2018 at 20:47, <masse.nicolas@gmail.com> wrote:
>> After reading your answer and thinking about it in the last days, I thing I understand things a bit better now.
>> First I understand that module are far less related to the linking problem than I first tough.
>> Also, I think I better understand how they will actually work in real world application.
>>
>> Still, one question remains for me:
>> If for example you wanna ship a library.
>> As of today, you generally with the library the headers so that people using the library will be able to compile their code and make use of the library you made.
>> But how does it work if you wanna use modules? do you ship a module file together with the lib? And if so, how do you intend to generate this module file?
> Yes, you ship the module interface with your lib. You compile the
> module for the target implementation you want to support.

To be clear, I believe Ville means that you ship the module interface 
unit source code (not a binary module artifact as they are not portable) 
and you link any object files produced by compiling the module interface 
unit in your compiled library for your supported platforms.

Tom.

>
>> Also note that even if I better understand the proposal now, my doubts about it and the need of declaring the module explicitly remains.
>> In fact, I would have prefer an approach where the exported symbols are deduced from the code instead of having to declare it explicitly.
> Deduced how? The problem we have today with headers is that everything
> in a header needs to be parsed, whether part of the actual
> interface of the library or not. Modules give us control over what
> things are part of the interface and what things are not.
>

-- 
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/08290107-c63b-3ef6-09d4-16c7b6c495ab%40honermann.net.

.
