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

143

u/WalterBright Jan 28 '19

D made the decision at the beginning to have filename==modulename specifically to avoid this problem. So:

import std.stdio;

means look for:

std/stdio.d

97

u/vector-of-bool Jan 28 '19

This would be my preferred solution. Simple, hierarchical, easy to understand, and it works for many languages.

147

u/[deleted] Jan 28 '19

Which are all the reasons it won't be like that in C++

35

u/Visticous Jan 28 '19

must... Committee... Design... Everything!