Hey,

On Tue, Sep 1, 2009 at 7:51 PM, Johannes Gilger<[email protected]> wrote:
>
> Hi list,
>
> being the Objective-C noob I am (having understood the technical side
> but still getting to know a lot of best-practices) I stumbled upon the
> use of forward-declarations in header-files today. Basically what it
> does is this:
>
> #include "PBGitTree.h"
>
> @interface PBGitHistoryController : PBViewController {
> [...]
>        PBGitTree* gitTree;
> [...]
>
> At that point in a header, the compiler doesn't need to know much about
> PBGitTree, other than that it's a class. So instead of the #include-line
> we could use:
> @class PBGitTree;
> and put the #include into the .m (implementation).
>
> Why this should be done is described here:
> http://vgable.com/blog/2008/12/04/cocoa-coding-style-minutia-all-forward-declarations-on-one-line-is-the-one-true-way/
> under ("What is @class good for?")

I don't oppose the change, but I don't think it's very useful to
change it all at once. We could just change it when we're touching the
code anyway. I've already done this in some parts, mostly when dealing
with circular dependencies, but GitX already builds pretty fast, no?
:)

Reply via email to