3 ms·
Having a limited C++ background, started with C++ in college, I have a half remembered idea about how #include works and linking and such not. When I started wo
by varikin 14y ago
Having a limited C++ background, started with C++ in college, I have a half remembered idea about how #include works and linking and such not. When I started working with Obj-C, I found the mix of include and import. This proposal looks like Apple is migrating their* import (module) system to C and C++.
As for removing #include, at least in Obj-C, #include is still there to allow working with C libraries. I would assume the same for C & C++.
* Not really sure what is Apple's Obj-C versus a standardized Obj-C
- mikeash 14y ago#include and #import are nearly identical. Both simply take the contents of the file you point them at and blindly copy that text into your source file at that location. The only difference is that #import will ignore subsequent attempts to insert the same file, while #include will obediently insert the same contents over and over again. Sadly, there's no such thing as "Standardized Obj-C", and Apple's version is about as close as it comes. They basically own the language.
- varikin 14y agoHmmm...I thought there was a bit more to #import than that, but good to know.