NSObject vs id

Florent Lacheroy <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
Hi,

I would like to collect your thoughts about a subject:

I wonder wether it is better to use NSObject or id.
I have seen Apple is making intensive use of id in its API.
But sometimes it looks very permissive like in NSMutableDictionary -  
setObject:forKey: or
This class need to retain its entries but the method does not require  
the object in argument to responds to "retain".
I assume that they want their objects to stay as flexible as possible  
but they could require at least the NSObject protocol in the example I  
gave.

Any opinion is welcome.

Thank you,

Florent.

_______________________________________________
MacOSX-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.