220 41220 <CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m=M7UA8=bf0O3A@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Modules and preambule, just why?
Date: Wed, 5 Dec 2018 21:01:59 +0200
Lines: 28
Approved: news@gmane.org
Message-ID: <CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m=M7UA8=bf0O3A@mail.gmail.com>
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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1544036409 10514 195.159.176.226 (5 Dec 2018 19:00:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Dec 2018 19:00:09 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBNGBUDQAKGQEWPMGAHA@isocpp.org Wed Dec 05 20:00:05 2018
Return-path: <std-proposals+bncBC5JHI7A7ALRBNGBUDQAKGQEWPMGAHA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot1-f71.google.com ([209.85.210.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBNGBUDQAKGQEWPMGAHA@isocpp.org>)
	id 1gUcOx-0002Yb-Fa
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Dec 2018 20:00:03 +0100
Original-Received: by mail-ot1-f71.google.com with SMTP id p4sf7554314otl.10
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Dec 2018 11:02:14 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1544036533; cv=pass;
        d=google.com; s=arc-20160816;
        b=h5jEB5Lk5gmzFaJk43A2b4aaAXPjX6wfnioEo93Z/jLr+9l361KV1uAd7Agu5JzP90
         RV4sIrHrJFmgGwQAHI+edZPIOi5AZ3Z30pypo0uqZHBN7iLJXp3y+bOgK3MTHRwULE0g
         28KX+mFKbAwILguPGnl+E8P9RKBVKAWCfanSuA8fet3ZX3uroORxjQaPtGrXiMye50WV
         rW15XqDSJuOnNNzj7YwrmSs2s860SIwXV2+SB5zani8cv645DnIsVGZIZXEJJ0bovIm6
         u7LrFVNT6gALrs6o4E8SbI36ScUDLHpRTj8DYlLapom2Tf02LzZoWfXW3iLaBa7zCpeA
         PaZg==
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:in-reply-to:references:mime-version:dkim-signature;
        bh=/HVGBWRAmbfaQRHmZmcsvL591Zr7EHrFnwz7tx/0hng=;
        b=ipVZdPobrPVaVlICO6BUNqj6OLBj3PmcfGB5kuLyn9nOsAfewuEyCEDmSTD1VqPrwL
         5ntoplwEuR0CcPt140uKxqj3hNbAEbwoHXbhP1fl9HGVBXpRqbp81bJQLi4+7UwJxhrd
         Wn6Pfbme0at9Mi8lgLRZ941ak/m/JzeOiZocrwQ7Ia9+bnyer+T81KJF6QUTOz2/4CHG
         4OL7oUi+9wOKzh52PT98zIrUOf0s+3voKGz+Mio/Bta/8RJ4ip54tCMEK/HSptoREQCo
         t23eNrNZ8snO2p3c82ACHzThQTNZvbqwFPUPSCTVbrrPFnvCVFZwm3OQazT5zcNPN4ut
         G3dg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=luChZlRJ;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to: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=/HVGBWRAmbfaQRHmZmcsvL591Zr7EHrFnwz7tx/0hng=;
        b=x3LKnLS7LOxnpwSUaXxaIGRBCVMdp5P/w/iftTv86AghVHNkNA+7CzyMiSPptlwiyh
         WHPin7qQ5sE0qM/w1uR5EnH7J6OefFXBmY2CmZDfLj+qeP96qeEqHZX3vcbJX++tjIul
         sgX47zGKGjV4kU/PHPWAWWHCnIklWlVJBOX1TmFrYaOwOc4H9apT/iCz3lwK6DasxX9W
         WYqZcnbER2KkxSQE3ofiERBEPTgw6SE38hpCaDj6rn5mK+sUB4A8g13tr94IirI/Ubp/
         s/Em6BVRYSHV1UdfgXFySq2qOdo0tkSDCL5dpYDS8QCaAJQC2A9sMeMkUOVVWHlofRZP
         iwYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to: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=/HVGBWRAmbfaQRHmZmcsvL591Zr7EHrFnwz7tx/0hng=;
        b=CGFLZnSix1OUXxLp+g3vmCTPKCeg5jOkMLBAvVEbIvtd4Hd3lW8vfWqBF3Clfq4c1s
         mJttSUPwEqSIPWcJpaZb5QgDKhS+rcIaw/lvjJLzNEkMrEDt2jtpfaSSlNZ/cn/ZP4lP
         PyuwPaBAk/eL+ijnMEmeB3/3KacoPYT9h/oFQIXQPzk/XbDL0GbhCUlk9n2q+txjKLqo
         EPy62Au3N44S+6PegK0gyg+b+UaAr3c2DoCqQ9kzYuWR1ySJH/ebbj5nXAg7TMIr4G24
         TqqJKWH6VYW3Q2D50Oa2DYx3t6u72Z4G40EZvlZMJf7oxj0nu8Ii71PgwjFDLBRIw8de
         hwow==
X-Gm-Message-State: AA+aEWbqCNzyBrCj/XcTeUa1ugFoeueXCdmlbRXb6gYrhwrS80fmlFLM
	eudT1V69ro2BoMoiJwiluJ+cBw==
X-Google-Smtp-Source: AFSGD/Uu2nO2zw0ZBiORnRlRpD1Yr9XFuK3qnAtsn7cmlBTz0B+uZQljzNdbSzZ1MRaKNpu4739KYA==
X-Received: by 2002:aca:ec82:: with SMTP id k124mr20130810oih.36.1544036533601;
        Wed, 05 Dec 2018 11:02:13 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:aca:803:: with SMTP id 3ls1008766oii.3.gmail; Wed, 05 Dec
 2018 11:02:12 -0800 (PST)
X-Received: by 2002:aca:1716:: with SMTP id j22mr13839779oii.19.1544036532409;
        Wed, 05 Dec 2018 11:02:12 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544036532; cv=none;
        d=google.com; s=arc-20160816;
        b=x76CFXG1Fp3wxLgVljsNH59HsiDT2DXW+cV7W/RaflMxkvD0B0yCuMYQVSa/HP0D1i
         0wRBObS1G9E6MI9gznhasF5NKpuoiCA6jrvU9eUz0MtJIEqOvxtmSJWYMwWP7ThEgQCR
         HdgC19MqAjyJKJutnRaDpZusS1g1kMVo2OWdzsE87vcFAzyxrSfg88iLaEMHIAAe0vqv
         tgx7vL1M8VLuzZ0plFNSqtGZAd8xjiR2n1O1jbVhQ5vdoDogpIHcoDqBtpBhHX0XuZg3
         8MwMfHJzqeiFhlhAkIp2dBIFZk1uZDP1TCzVulE0OlAyzuSw/AzSqW9rX2rRBt2lhwO6
         C1Aw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature;
        bh=8GQje2NRwoQdOFCmPMXobWYbeRX3Im+n8VGLSyUEPuA=;
        b=C4dtnA6J3ex+/iOvLVBGX4DVghIm+rD/rLrhCSe9d+1ZpIzEz84DNCYFte+/MHmZQI
         w2PILddNSpMHf06DuUUZpeuY3YiXvi6XrDhFg8j8YeQmdAvCUnb5C0TNRQ1xFClSRfks
         93fALIJExH+3sNHeFzeg6pVo51IFecTVq1bF210UsVA6DyVyzzJHBniTgeemvIuFr70L
         miAuCpinssjdpBeZsi7KNpbcTt+kCyr+y+599VBMuofWkShH7SHi9ftn47NZ4nUUzWM8
         C1RsGFgGaF4HoQ0LwwBJR06D+fsTY7GLWqmc/BRGhCYMCjQ7gDlbbnkuia/JXfifFsUZ
         xbBg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=luChZlRJ;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id y9sor11218252oto.119.2018.12.05.11.02.12
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 05 Dec 2018 11:02:12 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a9d:501:: with SMTP id 1mr17071874otw.133.1544036531647;
 Wed, 05 Dec 2018 11:02:11 -0800 (PST)
In-Reply-To: <a8310d69-20cb-48ba-8a8e-c62c09d4cd94@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=luChZlRJ;       spf=pass
 (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41
 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE 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-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:41220
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41220>

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.

> 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/CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m%3DM7UA8%3Dbf0O3A%40mail.gmail.com.

.
