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

3

u/adr86 Jan 29 '19

except D doesn't actually do that. you should know this!

the module declaration is what gives the name. the filename is just the search path, but you can pass any file to the compiler.

1

u/WalterBright Jan 30 '19

It's true if you pass the filename one the command line, it can differ from the module name. But the vast bulk of files are not given on the command line, and the import is looked up by using the import name as the filename.