Re: Proper use of Header files
Re: Proper use of Header files
- Subject: Re: Proper use of Header files
- From: David Rowland <email@hidden>
- Date: Sun, 28 Oct 2012 11:49:00 -0700
If the header is read by more than one implementation file, the compiler will generate more than one copy of the code, probably causing problems with the linker. In any case it is wasteful.
The only exception I know of is when writing C++ templates. The compiler needs to see all the code so that it can instantiate it when necessary, which might occur anywhere.
David
On Oct 28, 2012, at 9:13 AM, koko <email@hidden> wrote:
> Not an Xcode questions but a style question …
>
> What is the general consensus of put implementation code in header files?
>
> I find this annoying but many co-workers do this.
>
> -koko
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden