• 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:16:07 +0200

On 6/18/07, Wagner Truppel <email@hidden> wrote:
Hi everyone,

I apologize if this isn't directly related to Cocoa, but I suddenly
realized that I don't understand why id should be necessary. Why
isn't NSObject (or some other root class) enough?

NSObject is a Cocoa framework concept. Objective-C is not bound to Cocoa.

Fair enough. The point remains, though. To me, id is nothing more than a root class, much like Object in java. Is that true, or is there something else to it that I'm missing?


Additionally even within Cocoa not all objects inherit from NSObject
(some just conform to the NSObject protocol).

True. Again, they're id, so it's as if they inherit from a master root class.


I apologize for belaboring the point. It's just that I still don't see a difference between id and a root class.

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: "Frank D. Engel, Jr." <email@hidden>
    • RE: Why the need for the id type?
      • From: "Nelson Santos" <email@hidden>
    • Re: Why the need for the id type?
      • From: Nick Zitzmann <email@hidden>
    • Re: Why the need for the id type?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Why the need for the id type? (From: Wagner Truppel <email@hidden>)
 >Re: Why the need for the id type? (From: "Shawn Erickson" <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