220 14692 <99891ca2-7529-4d6b-8754-c6298ac8d334@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Modules with lazy symbol resolution
Date: Fri, 21 Nov 2014 23:51:18 -0800 (PST)
Lines: 35
Approved: news@gmane.org
Message-ID: <99891ca2-7529-4d6b-8754-c6298ac8d334@isocpp.org>
References: <a0293b4f-51bf-47cf-981b-67b299e8ab4e@isocpp.org>
 <3384057.c619ZPUSbM@tjmaciei-mobl4>
 <d3eca47b-5d2e-4ecc-94d1-e2f90810f4b5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_199_1050926665.1416642678990"
X-Trace: ger.gmane.org 1416642692 30055 80.91.229.3 (22 Nov 2014 07:51:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 22 Nov 2014 07:51:32 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCYZZ4E5WQCRB6EAYGRQKGQEOJ7MNXQ@isocpp.org Sat Nov 22 08:51:26 2014
Return-path: <std-proposals+bncBCYZZ4E5WQCRB6EAYGRQKGQEOJ7MNXQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCYZZ4E5WQCRB6EAYGRQKGQEOJ7MNXQ@isocpp.org>)
	id 1Xs5TV-0007r6-RP
	for gclcip-std-proposals@m.gmane.org; Sat, 22 Nov 2014 08:51:22 +0100
Original-Received: by mail-ie0-f198.google.com with SMTP id y20sf29416962ier.9
        for <gclcip-std-proposals@m.gmane.org>; Fri, 21 Nov 2014 23:51:20 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=bTHrGtmtu94Nx7OwBw4zEBOcUQl0WIUpT8yIW44H7Dk=;
        b=kPp64+s67ZH8+5F+/ej1aw26wlP7KR5IjM/ZktJlyDng9MW3D4nlu7yDf6ZNhDc+21
         zG2xqXMaeCe5bu12mjIp0p9aG6EIxZ2sbeO1Gb0pyC5tMd1Q7wVSP2jcKgiIRG1ipK/L
         lD7lN73LENASVQnbisXmEDjjLwdMvheQ+0hhEF8LXqU4QfTJHYpAt50iRAG8IBd9V+sJ
         gz+zRCCl2Z+EC+3Uufq5BHjXRXBnYJU8B2JVGAplcnWODCecqWbcYqhpBYyBT6nVzUrM
         cXggWJQR8wyTcKXNhGUslo3KR0BKPCN2J61Ky90+n5WgqjuTYeGV04g73EFqK/wQo9NL
         uUXQ==
X-Gm-Message-State: ALoCoQmIVwDjd1vuEVO18T4WQSehlUEza13hxKutYJhsKnfb4DvPgKzHH4wwbnBTkeP6XSMzu1Ap
X-Received: by 10.182.168.114 with SMTP id zv18mr8203139obb.23.1416642680642;
        Fri, 21 Nov 2014 23:51:20 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.142.66 with SMTP id ru2ls155354igb.43.canary; Fri, 21 Nov
 2014 23:51:20 -0800 (PST)
X-Received: by 10.50.33.39 with SMTP id o7mr29639igi.14.1416642680143;
        Fri, 21 Nov 2014 23:51:20 -0800 (PST)
In-Reply-To: <d3eca47b-5d2e-4ecc-94d1-e2f90810f4b5@isocpp.org>
X-Original-Sender: jeremy@jeremyms.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14692
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14692>

------=_Part_199_1050926665.1416642678990
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Even parsing C++ without knowing type information isn't possible, though th=
is could be worked around by adding typename and template as needed to disa=
mbiguate.  Compiling, or even instantiating templates, most certainly would=
 require complete information.  Therefore what you are suggesting could in =
principle be supported I think with only minimal language changes by separa=
ting the parsing step from the compilation step.  Parsing of a module would=
 produce some efficient binary representation of it, but would not generate=
 any machine code, and would not depend on the imported modules already bei=
ng parsed.  The compilation step would depend on the parsing but not the co=
mpilation of all imported modules.  The cost is that every imported type or=
 template would have to be annotated as such using the typename and templat=
e keywords as if they were dependent names in a template.

Whether this two step procedure would actually be faster in practice is unc=
lear.  Also everything I said ignores the fact that clang allows modules to=
 export preprocessor macros.  To handle that we would need a 3 step procedu=
re.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_199_1050926665.1416642678990--

.
