My rule of thumb is: if a direct declaration is sufficient, I use it. Otherwise, I import the full declaration using #import
.
This is mainly due to my experience with large projects, where the careless use of #import
(or #include
) can easily lead to a situation where the compiler must compile more than a million lines of code for each file without a header and where minor changes in one header file cause tons recompilation. As a result, compiling the code takes a lot of time.
Codo
source share