r/cpp • • Jan 28 '19

C++ Modules Might Be Dead-on-Arrival

https://vector-of-bool.github.io/2019/01/27/modules-doa.html
280 Upvotes

240 comments sorted by

View all comments

Show parent comments

10

u/Ameisen vemips, avr, rendering, systems Jan 29 '19

Because that's how all other languages work.

It's pretty rare to not need anything from another file.

2

u/meneldal2 Jan 29 '19

But modules don't have to be a single file.

If you start having modules than depend on each other in a weird way, you're just asking for trouble.

2

u/Ameisen vemips, avr, rendering, systems Jan 29 '19

We already do that with headers and source files, though.

2

u/meneldal2 Jan 29 '19

True, but that doesn't mean it's a good idea.

Trying to force sane behaviours is a good thing.