oleksii-demedetskyi / Parus

Parus is simple chain style auto-layout helper for objective-c.
MIT License
106 stars 4 forks source link

Precompiled headers should not be used for global visibility #50

Closed dodikk closed 9 years ago

dodikk commented 10 years ago

Some includes of foundation headers are missing

dodikk commented 10 years ago

@dodikk am I missing something, but Foundation specified in *.pch

dodikk commented 10 years ago

Foundation specified in *.pch

The only benefit of pre-compiled headers is build speed. Nothing more, nothing less. Do not use _.pch for global visibility. In other words, you should write explicit includes to the foundation whenever you _subclass* its contents. Otherwise you should use forward declarations.

http://gamesfromwithin.com/the-care-and-feeding-of-pre-compiled-headers


The simplest way to think of pre-compiled headers is as a cache for header files. The compiler can analyze a set of headers once, compile them, and then have the results ready for any module that needs them.

(from the same article)