C++ Logo

sg15

Advanced search

Re: [SG15] module source suffixes

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 28 Aug 2019 04:45:29 +0000
It is still not clear to me that a module interface partition needs special suffix from a primary module interface unit.
Same for implementation partition unit.

-- Gaby

| -----Original Message-----
| From: SG15 <sg15-bounces_at_[hidden]> On Behalf Of Nathan Sidwell
| via SG15
| Sent: Monday, August 26, 2019 7:19 AM
| To: sg15_at_[hidden]
| Cc: Nathan Sidwell <nathan_at_[hidden]>
| Subject: [SG15] module source suffixes
|
| The proposals I've seen for a suffix to denote modular interface files
| take the form of changing the traditional c++ suffixes to something else.
|
| 1) There's the discussion of whether the 'c' is replaced by an 'm', but
| that leads to confusion if your suffix is '.cc' (hence the clang
| approach of appending an 'm'.
|
| 2) It requires teaching all your tools (and users) that the new suffix
| means C++.
|
| 3) With a paired header file/source file source base of the form
| foo/foo.cc or foo.h/foo.cc, converting the header to an interface will
| require either renaming the stem of one of them, or teaching the build
| system that naming the object file from the stem is not right.
|
| These all seem somewhat awkward.
|
| There's also the issue of module partitions. IIUC the new suffix is to
| denote interfaceness. But module partitions also fall into the same
| boat as primary module interfaces in that regard -- they generate CMIs.
| Naming module partitions with the same suffix as primary interfaces
| seems confusing. What's been discussed about that?
|
| Has there been discussion of naming the module interface by prepending a
| new suffix: foo.m.cc (or foo-m.cc) This avoids the above 3 issues.
| multisuffix files do exist (foo.tar.gz), but perhaps the '-m' form may
| be more palatable?
|
| Further, one could use 'mp' to denote a module partition:
| foo-m.cc -- primary interface
| foo-mp.cc -- partition
| foo.cc -- implementation
|
| nathan
| --
| Nathan Sidwell
| _______________________________________________
| SG15 mailing list
| SG15_at_[hidden]
| https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
| isocpp.org%2Fmailman%2Flistinfo.cgi%2Fsg15&amp;data=02%7C01%7Cgdr
| %40microsoft.com%7C647efd45b4bb4b90df0208d72a305861%7C72f988bf8
| 6f141af91ab2d7cd011db47%7C1%7C0%7C637024259440421439&amp;sdat
| a=5UlOFHK%2FkfyAil8srZcfB4l0ZNWxqOt2zj4v95chHfo%3D&amp;reserved=0

Received on 2019-08-27 23:47:33