C++ Logo

sg15

Advanced search

Re: [Tooling] Request for modules recommendations

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 11 Apr 2018 21:24:11 +0000
From its inception, I have been helping teams at Microsoft develop good modules programming practices, and I have “Programming with C++ Modules” in the work, so I can help - but I can’t be the main author because time is being eaten by the spec and other things.

— Gaby

On Apr 11, 2018, at 9:28 AM, Ben Craig <ben.craig_at_[hidden]<mailto:ben.craig_at_[hidden]>> wrote:

Any volunteers for a first pass? Preferably someone with some experience in this area? (hint hint Boris Kolpackov)

The other person I’m thinking of that will probably have valuable (and strong) opinions on the matter is John Lakos, seeing as he has literally written a book on this kind of topic… though not with modules as a backing technology.

From: tooling-bounces_at_[hidden]<mailto:tooling-bounces_at_[hidden]> <tooling-bounces_at_[hidden]<mailto:tooling-bounces_at_[hidden]>> On Behalf Of Titus Winters
Sent: Wednesday, April 11, 2018 9:07 AM
To: WG21 Tooling Study Group SG15 <tooling_at_[hidden]<mailto:tooling_at_[hidden]>>
Subject: Re: [Tooling] Request for modules recommendations

Yeah, those seem like great questions to be asking. Thanks, Ben.

On Wed, Apr 11, 2018 at 12:58 AM Boris Kolpackov <boris_at_[hidden]<mailto:boris_at_[hidden]>> wrote:
Ben Craig <ben.craig_at_[hidden]<mailto:ben.craig_at_[hidden]>> writes:

> * What granularity should I provide for my modules?
> ** Do I translate headers to modules one-to-one?
> ** Do I just have one big module for my entire library?
> ** Something in between?
>
> * What file extension(s) should I use for module files?
>
> * How should we map module names to file names? Just by replacing
> dots with slashes?
>
> * How should tools find modules?
>
> I know just enough about modules to ask subtly wrong questions, [...]

No, these are spot on. We had to answer[1] all of these (and some more)
while adding support for modules in build2.

The problem of mapping module names to file names is especially tricky:

1. We don't want it to become tedious like specifying the mapping for
   each module explicitly would be.

2. We want decent performance from the build system so parsing each
   module interface to find its name is probably not an option.

3. We want the file names to fit the project's overall scheme (some
   might want FooBar, others foo_bar, I like foo-bar and you seem
   to prefer foo/bar).

[1] https://build2.org/build2/doc/build2-build-system-manual.xhtml#cxx-modules<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__build2.org_build2_doc_build2-2Dbuild-2Dsystem-2Dmanual.xhtml-23cxx-2Dmodules%26d%3DDwMFaQ%26c%3DI_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA%26r%3Dy8mub81SfUi-UCZRX0Vl1g%26m%3DcAIMNLCbJW_NgXfrRG9r9fGktJq3Meju41ylEMm8pCs%26s%3DFnKVt6XsCvcPL5uV4HPJsApSuYNapIqeYQ9-qVoRV1A%26e%3D&data=02%7C01%7Cgdr%40microsoft.com%7Cdf43b5088426414cb22508d59fc0e41e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636590573182906223&sdata=EnunmQHtCoZnNMSKyXvGbL37gygramTtTtJRNSXI5zA%3D&reserved=0>

Boris
_______________________________________________
Tooling mailing list
Tooling_at_[hidden]g<mailto:Tooling_at_[hidden]>
http://www.open-std.org/mailman/listinfo/tooling<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__www.open-2Dstd.org_mailman_listinfo_tooling%26d%3DDwMFaQ%26c%3DI_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA%26r%3Dy8mub81SfUi-UCZRX0Vl1g%26m%3DcAIMNLCbJW_NgXfrRG9r9fGktJq3Meju41ylEMm8pCs%26s%3DJUXAev4FmbOCKuQhkIN-oi7eOQWlbLBpaFzhFjMBH8g%26e%3D&data=02%7C01%7Cgdr%40microsoft.com%7Cdf43b5088426414cb22508d59fc0e41e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636590573182906223&sdata=QTM12o%2B%2Fpn07u0%2FaMWo%2FDmUCO%2F%2Bx9j18v0Np7vxSX9w%3D&reserved=0>
_______________________________________________
Tooling mailing list
Tooling_at_isocpp.open-std.org<mailto:Tooling_at_[hidden]>
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.open-std.org%2Fmailman%2Flistinfo%2Ftooling&data=02%7C01%7Cgdr%40microsoft.com%7Cdf43b5088426414cb22508d59fc0e41e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636590573182906223&sdata=PmJgKBbQGnAJ4CIqngcLJGCNsM52%2FmgmnBrbW%2FiivR8%3D&reserved=0

Received on 2018-04-11 23:24:32