Date: Fri, 20 Sep 2019 20:52:45 +0200
Mathias Stearn <redbeard0531+isocpp_at_[hidden]> writes:
> But the current semantics of the syntax a.b differs from a:b in more ways
> than just whether the submodule is publicly importable or not. With a.b,
> the a module and other submodules of a are unable to forward declare types
> owned by a.b, and vice-versa. With a:b, forward declaration is legal for
> all entities owned by the a module. Additionally, a:b-submodules have
> access to each others module-linkage entities, while a.b-submodules do not.
And that's a good thing: if your entities are related, put them into
the same module (and use partitions if you need to organize things
inside).
> But the current semantics of the syntax a.b differs from a:b in more ways
> than just whether the submodule is publicly importable or not. With a.b,
> the a module and other submodules of a are unable to forward declare types
> owned by a.b, and vice-versa. With a:b, forward declaration is legal for
> all entities owned by the a module. Additionally, a:b-submodules have
> access to each others module-linkage entities, while a.b-submodules do not.
And that's a good thing: if your entities are related, put them into
the same module (and use partitions if you need to organize things
inside).
Received on 2019-09-20 14:05:00