{"id":6608,"date":"2012-11-30T17:46:02","date_gmt":"2012-11-30T22:46:02","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=6608"},"modified":"2012-12-10T17:34:08","modified_gmt":"2012-12-10T22:34:08","slug":"c-and-objective-c-modules-proposal","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/11\/30\/c-and-objective-c-modules-proposal\/","title":{"rendered":"C and Objective-C Modules Proposal"},"content":{"rendered":"<p><a href=\"http:\/\/llvm.org\/devmtg\/2012-11\/#talk6\">Doug Gregor<\/a>, who works on Clang at Apple (via <a href=\"http:\/\/news.ycombinator.com\/item?id=4832568\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"http:\/\/llvm.org\/devmtg\/2012-11\/#talk6\"><p>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 as LONG_MACRO_PREFIXES, 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.<\/p><\/blockquote>\n<p>There&rsquo;s a <a href=\"http:\/\/llvm.org\/devmtg\/2012-11\/Gregor-Modules.pdf\">PDF of his slides<\/a>. This seems like a great idea that will improve compilation times while maintaining compatibility.<\/p>\n<p>Update (2012-12-10): Here&rsquo;s the thread on <a href=\"http:\/\/lambda-the-ultimate.org\/node\/4649\">Lambda the Ultimate<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Doug Gregor, who works on Clang at Apple (via Hacker News): 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 as LONG_MACRO_PREFIXES, include guards, and the occasional #undef [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[45,230,46,229,54],"class_list":["post-6608","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-c","tag-clang","tag-languagedesign","tag-llvm","tag-objective-c"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=6608"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6608\/revisions"}],"predecessor-version":[{"id":6643,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6608\/revisions\/6643"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=6608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=6608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=6608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}