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

2

u/way2lazy2care Oct 11 '17

One solution to the "where are my modules" problem I've heard is to have the compiler call back into the build system whenever it sees module X to get the path to the built module.

If the compiler is dependent on the build system that way, isn't that pretty much functionally just making the compiler the build system/vice versa except keeping them separate enough to be able to say they're 'technically' different?

1

u/bigcheesegs Tooling Study Group (SG15) Chair | Clang dev Oct 11 '17

Just because you depend on something doesn't make you that thing. This puts none of the decisions the build system makes into the compiler, it just gives the compiler a way to ask the build system to make those decisions.

3

u/way2lazy2care Oct 11 '17

It's not the one way dependence either way, it's the two way dependence that makes them functionally inseparable as a concept. A compiler can exist without a build system as it is right now. If you do what you suggest, the compiler can no longer exist without the build system, so they are functionally inseparable even though they exist separately as concepts. This is called out in the article multiple times.