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++

14

u/Valmar33 Jan 28 '19

Why must they inflict their misery upon others? To pretend at being clever and intelligent? To remain relevant? To inflict mental torture on people trying to figure out to how solve programming conundrums?

I guess they really want to help C++ programmers keep their jobs, because otherwise, their huge projects would implode.

Kind of like Java ~ except replace long-ass class names with tormentingly complicated grammar that explodes horrifically if you miss a step.

Those ranges-v3 templates come to mind... :|

15

u/Patman128 Jan 28 '19

Why must they inflict their misery upon others?

If a good idea breaks the workflow of even one of the Elder Wizards on the C++ language committee then it's thrown out.

13

u/[deleted] Jan 28 '19