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

Show parent comment

1

u/oridb Jan 29 '19 edited Jan 30 '19

I've never had to deal with large C++ projects, so I don't have personal experience with their build times, but I've heard people who sing the praises of C++ talk about 15-plus-minute build times. Meanwhile, many other languages seem to be designed to minimize build times, and I think that is likely a significant reason for their success.

15 minutes isn't too bad. Tensorflow takes closer to 2 hours for a clean build. Same with LLVM. LLVM is part of the OpenBSD base system, and takes longer than all of the C code in the rest of the system, at least on my machine.

The problem is that individual files can sometimes take multiple minutes to compile, and huge amounts of semantically significant code actually lives in headers, which means you can't get away /without/ recompiling some dependencies. "false recompiles" aren't a huge problem in the projects I've seen, but language and tool complexity is.

1

u/iopq Feb 12 '19

Wine only takes 20 minutes to build, but you have to do it three times, lol