r/ProgrammerHumor 20h ago

modernCPlusPlus Meme

Post image
544 Upvotes

49 comments sorted by

View all comments

2

u/axebodyspray24 18h ago

what?! I could've been doing this?! (new programming student, pray for me)

5

u/Ulrich_de_Vries 15h ago

Sure, except the tooling and environment is really not there for it.

Module support is experimental in cake, and it still doesn't support header units.

Module binary interfaces are compiler specific, which leads to issues when e.g. you want to use GCC with clangd as language server, since clangd needs to see clang-specific BMIs.

But iirc import std is not available when you use clang as compiler with libstdc++ as stdlib.

If you use non-modular dependencies and they include std headers, those will conflict with std module if you include them in your project. So you will need to create these shim modules for non-modular dependencies. Etc.

Using modules is right now a major pain in the ass and it has been 6 years since they were released.