Re: Why the need for the id type?
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