MP4 video of Doug Gregor's talk on Modules is now available via llvm.org. Combining links here:
Modules (MP4 video) (PDF slides)
Doug Gregor - Apple
The C preprocessor has long been a source of problems for programmers and tools alike.
Programmers must contend with widespread macro pollution and #include-ordering problems due to ill-behaved headers. Developers habitually employ various preprocessor workarounds, such asLONG_MACRO_PREFI
XES,#include
guards, and the occasional#undef
of a library macro to mitigate these problems.Tools, on the other hand, must cope with the inherent scalability problems associated with parsing the same headers repeatedly, because each different preprocessing context could effect how a header is interpreted – even though the programmer rarely wants it.
Modules seeks to solve this problem by isolating the interface of a particular library and compiling it (once) into an efficient, serialized representation that can be efficiently imported whenever that library is used, improving both the programmer’s experience and the scalability of the compilation process.
Add a Comment
Comments are closed.