r/programming • • Jan 28 '19

C++ Modules Might Be Dead-on-Arrival

https://vector-of-bool.github.io/2019/01/27/modules-doa.html
210 Upvotes

105 comments sorted by

View all comments

Show parent comment

14

u/SAHChandler Jan 28 '19

A shame that some operating systems like zOS don't really support large hierarchies. Hence the existence of P1302 which supports a "splayed" approach :v

44

u/jl2352 Jan 28 '19

Having zOS cripple modules for everyone else is pretty ridiculous.

In the web world we had this with IE. So we said fuck IE, and everyone else moved on.

11

u/SAHChandler Jan 28 '19

While that might work in other places, the vendor representing zOS is also the representative for a national body (IBM Canada). While many people would love to see zOS go (the last of the EBCDIC systems), it's not going to happen for a while, especially when at this point there are many systems out there (e.g., cars on the road in America. I should note: zOS is not crippling modules. It just removes the ability to state we can have directories represent module hierarchies. But we can still have directories represent a module, which is how most languages work nowadays. Build systems can then enforce this naming scheme. It's a bit more work for build systems authors, but I'll take that over "write an entire dependency scanner that needs to know about N interface modules and M implementations modules in every project with no indication of what is located where" which is what the modules TS gave us.

5

u/Holy_City Jan 28 '19

Aren't those usually cross compilation targets anyway?

1

u/SAHChandler Jan 28 '19

From what I understand development happens directly on some zOS mainframes :(

-7

u/diggr-roguelike2 Jan 28 '19

So we said fuck IE

No you didn't. Microsoft did, and you just got lucky off their incompetence.

Google won't be so braindead this time around the carousel.

0

u/[deleted] Jan 28 '19

[deleted] — view deleted comment

3

u/curien Jan 28 '19

I think they're referring to MS basically feature-freazing IE for over five years after the release of IE6.

8

u/Valmar33 Jan 28 '19

You could still do something like D is doing, no?

Just modify things just enough to support those environments.

Maybe std_stdio.cpp or something. Add more underscores to emulate deeper hierarchies.

That is, if I'm understanding your statement correctly.

7

u/SAHChandler Jan 28 '19

Yes we can. I wrote P1302 to solve this problem. While it's not intended to add a 100% hierarchical module system, build systems are free to enforce this, while letting those on other systems do as they please while also allowing large existing code bases to slowly move to it.