Building C++ modules

Gregor Mückl gregormueckl at gmx.de
Fri Aug 9 14:16:22 UTC 2019


On Friday, 9 August 2019 at 08:37:25 UTC, Atila Neves wrote:
> C++, to preserve support for platforms that don't have a 
> hierarchical filesystem (I have no idea what they are or why 
> anyone cares about them), decided to punt on how to find 
> modules and leaves it up to the implementation.
>

This was done to support mainframe operaring systems,  I think. 
As far as I can tell, z/OS (formerly OS/360) doesn't have a 
hierarchical file system in the classic sense. Objects there have 
a name with different segments/fields, but at least a few of them 
have semantics that the operating susten cares about.

This is also one of the reasons why the committee didn't 
standardize #pragma once in favor of a #once [unique id].

> The other difference is that despite having modules, C++20 
> still has the equivalent of module headers and module 
> implementations.
>
> I read a whole blog post explaining C++ modules once. I shook 
> my head throughout and can't believe what they've gone with. 
> I've also forgotten most of it, probably due to my brain 
> protecting itself lest I go mad.

Reading up on C++ modules leaves the impression that the ball was 
dropped so hard that it left a massive crater on impact. I have 
tries ti read up on them several times and I still haven't 
figured out how you aee supposed to use them.




More information about the Digitalmars-d mailing list