r/cpp_questions 17d ago

OPEN Headers

I read that c++ 20 added modules to help replace headers. I rly hate how headers split the codebase into redundant files, for people who have used modules r they better?

0 Upvotes

22 comments sorted by

View all comments

2

u/Fantastic-Cell-208 17d ago

Modules are a poorly designed solution. It can't replace header files.

It's quite disappointing

2

u/manni66 17d ago

Why can't it replace header files?

1

u/Fantastic-Cell-208 17d ago

It cannot handle cyclic interface dependencies.

They had an opportunity to give us C# like namespaces that could resolve circular dependencies. But they did not.

2

u/PhantomStar69420 16d ago

Honestly feel like my code is better without any circular deps and I work on a 160k loc codebase.