• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to avoid warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to avoid warning?


  • Subject: Re: How to avoid warning?
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 23 Jan 2013 14:13:41 +0100

On Jan 22, 2013, at 8:12 PM, Jens Alfke <email@hidden> wrote:
> @interface SomeFictionalClassName
> - (id) initWithManager: (Foo*)manager;
> @end

That feels a bit "dirty" to me. I'd recommend using a protocol instead. As long as the compiler has seen the method *somewhere*, it will consider it having been declared. So

@protocol AvoidCompilerWarning
- (id) initWithManager: (Foo*)manager;
@end

is, for the purposes of this particular discussion, equivalent to Jens's fictional class interface, but doesn't imply that such a class might exist to a (human) reader.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to avoid warning? (From: Dave <email@hidden>)
 >Re: How to avoid warning? (From: Steve Sisak <email@hidden>)
 >Re: How to avoid warning? (From: Dave <email@hidden>)
 >Re: How to avoid warning? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Best guess at expressing a string as a variable
  • Next by Date: Re: How to avoid warning?
  • Previous by thread: Re: How to avoid warning?
  • Next by thread: Re: How to avoid warning?
  • Index(es):
    • Date
    • Thread