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

Why the need for the id type?


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

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? In java, for instance, all objects inherit from Object. In a very real sense, as far as I can see, that is essentially equivalent to full dynamic typing. And, sure enough, you have dynamic binding, polymorphism, and introspection (though it's somewhat annoying to work with it in java).

I don't remember when or where from, but I once heard it said that Cocoa couldn't be completely done in java. I don't see why not. In any case, that's not the main reason for my question. My question is really about understanding what is so important or different about id that makes it necessary.

Oh, and, yes, I have read Apple's pdf on Objective-C. :)

Thank you in advance.
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: Half Activist <email@hidden>
    • Re: Why the need for the id type?
      • From: Charles Steinman <email@hidden>
    • Re: Why the need for the id type?
      • From: "Shawn Erickson" <email@hidden>
    • Re: Why the need for the id type?
      • From: mmalc Crawford <email@hidden>
  • Prev by Date: Re: NSTreeController, minus set mutation, array exception
  • Next by Date: Re: Why the need for the id type?
  • Previous by thread: Re: NSTreeController, minus set mutation, array exception
  • Next by thread: Re: Why the need for the id type?
  • Index(es):
    • Date
    • Thread