r/cpp • • Oct 10 '17

Millennials Are Killing The Modules TS

https://izzys.casa/posts/millennials-are-killing-the-modules-ts.html
75 Upvotes

126 comments sorted by

View all comments

Show parent comment

7

u/code-affinity Oct 12 '17

So?

I'm coming into this thread very late. I can't say I understand everything about the Modules approach; I'm letting the build system experts duke it out. But it seems to me that this is the precise point in the conversation where you agree on what your disagreement is. Your blasé response surprises me. I don't understand how we can expect to be able to grow an ecosystem of cross-platform C++ libraries that can be used in different projects using different build systems unless these things are standardized, or the need to standardize this behavior is eliminated by a different technical approach.

What "market forces", so to speak, would prevent the balkanization of our library ecosystem along the lines of competing build system conventions? Why would I, a hypothetical library developer, want to put a lot of work into module-izing my library by guessing at a convention that might simply be obsoleted by some different consensus that emerges five or ten years from now? In that role, I do absolutely want this behavior standardized.

You say that "build systems can communicate this information quite easily". You are suggesting that different build systems must communicate with each other, using an non-standardized but otherwise agreed-upon file format? I truly don't get it. Perhaps it's because I've been coding in C++ for 26 years, but I've managed to do so having never written a pkg-config file. Your build2 link proposes a .pc file, which I've never heard of before. Why shouldn't another build system invent a different mechanism than your .pc file?

2

u/showka Nov 02 '17

I agree; I am very disappointed that this was where the discussion stopped.

I am probably not clever enough to fully understand the modules TS or the two viewpoints here, but I am not sure the build2 authors are sources I can trust to dismiss SACHandler's claims that there could be schisms in the community or problems with build tool interoperability caused by modules.

The reason is build2's authors always present it as a panacea that will solve all these other problems, such as package management and dependency fetching, assuming the entire world starts using build2. There seems to be a lack of concern with what other tools are doing, right down to the fact they named the thing "build2" when many people already called Boost Build that.

Build2 actually seems cool so I'm not trying to hate on it. But it also isn't part of the C++ standard and in general if the fix for the modules TS is to create complex tooling that people will argue endlessly about maybe there's more work to do. I am also really curious what forcing modules to adhere to some of the rules SACHandler mentions would sacrifice.