discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isKindOf: - GSObjCIsKindOf


From: Stefan Böhringer
Subject: Re: isKindOf: - GSObjCIsKindOf
Date: 30 Aug 2001 09:05:29 +0200

On 30 Aug 2001 02:06:07 -0400, Marko Mikulicic wrote:
> Nicola Pero wrote:
>  >>It seems that the class method +isKindOfClass: has precedence over the
>  >>instance method -isKindOfClass: defined in NSObject (an thus 
> inherited >>by every class object).
>  >> The +isKindOfClass: is defined with the == operator and NSObject.
>  >>Is this correct ?
> 
>  >Yes - according to the doc, this is what other openstep systems do
> 
> Why duplicate the isMemberOf method and why deviate from the semantic
> of the instance method isKindOfClass ?
 
> Objective-c is based on smalltalk and it seems very strange to me that
> the concept of "kind" is so deviated, unless some important reason
> induced this design decision. Somebody knows why ?
> (Strange, I looked in the specs of OpenStep (on gnustep.org) and in the 
> docs of MacOSX and I didn't find a single word on isKindOfClass.)

You can find the documentation for +/-isKindOfClass: in the NSObject
class and the NSObject protocal pages in the apple MacOSX docs. I just
had a look two days ago when Nicola corrected me on this topic ;-)

IIRC NextStep had only isKindOf: methods, no isMemberOf: method (method
names used to be not as verbose as in OPENSTEP that time). isKindOf:
checked for inheritance, both, for the class and the instance method. As
to why the semantical change occured with OPENSTEP (or was it RDR1 ?) -
I don't know, and it appeared very strange to me, as well as to others,
since the class method can be trivially replaced by a simple comparison.

Best wishes,

        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]