C++ Logo

sg15

Advanced search

Re: [isocpp-core] unimported implementation partitions

From: Mathias Stearn <redbeard0531_at_[hidden]>
Date: Wed, 8 Jun 2022 22:47:39 +0200
On Wed, 8 Jun 2022 at 22.34 Daniel Ruoso <daniel_at_[hidden]> wrote:

> Em qua., 8 de jun. de 2022 às 16:31, Mathias Stearn
> <redbeard0531_at_[hidden]> escreveu:
> > Are you saying that changing
> > module m;
> > to
> > module m:part;
> > can break a working program? That seems like an unfortunate
> interpretation to me.
>
> That changes the type of the translation unit, from a "module
> implementation unit" to an "module internal partition unit". The
> semantics of those two types of units are fundamentally different.
>
> That's why we've been avoiding the term "implementation partition",
> because it implies that it's a partition of the implementation unit,
> when that's absolutely not the case.


http://eel.is/c++draft/module.unit seems pretty clear that both are
implementation units. AFAICT implementation partitions are basically the
same as implementation non-partitions that gain the ability to be imported
and lose the implicit import of the PMI. Is here some wording you can point
me to that makes this “fundamental difference” clear? Or wording that would
justify having that source modification change the semantics of an
otherwise unmodified program?

I don’t parse implementation partition as “partition of the implementation”
more as “partition unit that also happens to be an implementation unit”.
Similarly for “interface partition” because he PMI is also a “partition of
the interface” (the main or root partition) but it isn’t a partition unit
so it can’t be a “partition unit that happens to be an interface unit”.


>
> daniel
>

Received on 2022-06-08 20:47:51