Re: Deprecated method documentation
Re: Deprecated method documentation
- Subject: Re: Deprecated method documentation
- From: Fritz Anderson <email@hidden>
- Date: Thu, 13 Nov 2003 09:05:47 -0600
On 12 Nov 2003, at 4:23 AM, Patrick Machielse wrote:
Why hasn't 'deprecation support' been implemented in the compiler,
again
like in Java. Why not let the compiler warn us about deprecated
methods in
the first place? (we would have noticed the depracation of
stringWithCString: in Jaguar, I too found out by accident...)
Because Objective-C is a dynamically-typed language. NSString may
deprecate the cString message, but MyOwnClass may have a message named
cString that is still perfectly valid. The recipient of a cString
message may have a compile-time type of id, referring to an NSString, a
MyOwnClass, an object that doesn't understand cString at all, or nil.
An Objective-C compiler would have no way in principle to distinguish
deprecated uses from nondeprecated.
-- F
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.