• 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: confused about floats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: confused about floats


  • Subject: Re: confused about floats
  • From: Velocityboy <email@hidden>
  • Date: Sat, 9 Oct 2010 15:25:21 -0700

On Oct 9, 2010, at 3:12 PM, Ariel Feinerman wrote:

> 2010/10/9 Kyle Sluder <email@hidden>
>
>>
>> In fact, I can't think of a situation when it *ever* makes sense to
>> type something as id <NSObject> rather than NSObject.
>>
>> Because you can wish to use your own root class, there is difference
> between these. I dont know, but maybe it is why the delegates is always has:
> id <Thing>, it is just my opinion.


These two constructs are not synonyms.

NSObject *foo;		// foo is a pointer to an object of type NSObject
id<NSObject> foo;	// foo is a pointer to an object of unspecified type which implements the protocol named NSObject

This is a bit confusing because there are both a protocol called NSObject which specifies the methods you need to implement if you're creating your own base class for all objects. NSObject the type implements NSObject the protocol and IS the default base class for all other objects.

The reason delegates are specified using the <> notation is that they are protocols, not classes; they specify the methods the delegate must or can usefully implement, but they do not provide an implementation for those methods.


>
>
>
> --
> best regards
> Ariel
> _______________________________________________
>
> 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

_______________________________________________

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: 
 >confused about floats (From: Amy Heavey <email@hidden>)
 >Re: confused about floats (From: Ariel Feinerman <email@hidden>)
 >Re: confused about floats (From: Kyle Sluder <email@hidden>)
 >Re: confused about floats (From: Ariel Feinerman <email@hidden>)

  • Prev by Date: Re: confused about floats
  • Next by Date: Re: clarifications about coredata sub to-many entities fetching
  • Previous by thread: Re: confused about floats
  • Next by thread: Re: confused about floats
  • Index(es):
    • Date
    • Thread