• 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: Why the need for the id type?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why the need for the id type?


  • Subject: Re: Why the need for the id type?
  • From: Wagner Truppel <email@hidden>
  • Date: Mon, 18 Jun 2007 23:12:55 +0200

On Jun 18, 2007, at 1:46 PM, Wagner Truppel wrote:

I don't understand why id should be necessary. Why isn't NSObject (or some other root class) enough?

<http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaFundamentals/CocoaObjects/chapter_3_section_3.html#//apple_ref/ doc/uid/TP40002974-CH4-DontLinkElementID_130>

mmalc

Yes, I've read that before. Now, note this sentence:

"The id data type makes it possible to substitute any type of object at runtime."

The same would be true of some actual root class, be it NSObject or some other, as in java's Object. That's the essence of my question, namely, that id seems to be nothing but a root class in disguise.

Wagner
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Why the need for the id type?
      • From: Greg Titus <email@hidden>
    • Re: Why the need for the id type?
      • From: mmalc Crawford <email@hidden>
References: 
 >Why the need for the id type? (From: Wagner Truppel <email@hidden>)
 >Re: Why the need for the id type? (From: mmalc Crawford <email@hidden>)

  • Prev by Date: Re: Why the need for the id type?
  • Next by Date: Re: Why the need for the id type?
  • Previous by thread: Re: Why the need for the id type?
  • Next by thread: Re: Why the need for the id type?
  • Index(es):
    • Date
    • Thread