C++ Logo

sg15

Advanced search

Re: [SG15] module source suffixes

From: Nathan Sidwell <nathan_at_[hidden]>
Date: Thu, 29 Aug 2019 12:49:11 -0400
On 8/29/19 11:30 AM, Boris Kolpackov wrote:
> Nathan Sidwell <nathan_at_[hidden]> writes:
>
>>> I don't view this as changing something existing. Module interface
>>> units did not exist until now. We are now deciding which extension
>>> they should be using.
>>
>> These are C++ source files. There are already conventions for their
>> suffixes. That is the default position.
>
> We will then have to agree to disagree on this one ;-).
That seems a rather fundamental disagreement. Which one of those claims:
1) They are C++ source files,
2) we already have a convention for suffixing C++ source files,
3) that is the default position

do you disagree with?

> We seem to be coming to this from different POV on what happens to
> a header during modularization: I think it becomes an interface
> unit and thus deserves a distinct extension.

If you modularize a header file you'll get a primary module interface,
which is source code to be compiled as a distinct TU. We already have a
convention for suffixing such files.

> You seem to think the
> header is thrown away/merged in with only the source file left.

If one has a single source file companion to the header file, you might
chose to move its contents into the primary module interface. Or you
might not. If you chose not to, you'll have to give the primary module
interface and the single implementation unit different source file
names. As I've already said, they are both C++ source, compiled as
separate TUs, so existing convention suggests giving them both your
favourite C++ suffix, and making the basenames different.

nathan

-- 
Nathan Sidwell

Received on 2019-08-29 11:51:17