• 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
Re: What's with these redundant methods ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's with these redundant methods ?


  • Subject: Re: What's with these redundant methods ?
  • From: Lloyd Dupont <email@hidden>
  • Date: Wed, 23 Apr 2003 11:28:38 +1000

I do protest, GNUstep implement NSObject as well ! as does NeXTSTeP 3.3 ! (or 4.3, my memory is not what it used to be :-)
and the retain/release mechanism is a very usefull addition !

I believe that NSObject was introduced with the OpenStep product where the last release was 4.2. NeXTStep
sports Object ALONE as the root much in the form that still lives on in the Gnu runtime. Ah yea, retain/release,
maybe I'll get around to checking those out sometime. Still really haven't found the need as I'm old school and
fairly adept at memory management.
you should, take just a little while to read about, a few days to become confident with and.. it's so much easier.
I remember (now) I used to (long ago) programs on NeXT 3.3, then the version 4.0 was released, well I was a bit lost at the begin,but later on I found the change (mainly the retain/release mechanism, as far I remember) so much better.
And if you like total memory control, no worry, it's NOT a concurrent garbage collection mechanism, you DO have full control, it's just an easy policy :-)

Ummm, O.K. but back to my original Q, what was wrong with Object's methodFor: and respondsTo: . Why create 2 new
methods, methodForSelector: and respondsToSelector:, that do EXACTLY the same thing in NSObject ? Is it for
namespace clashes ? Is anyone likely to use both the Object and NSObject class in the same App ?

well, now I'm working with an apple, I have no NeXT at hand, so ...
anyway:
1st: maybe they add a few functionality while overriding ?
2nd: it seems, (I'm a bit puzzled) that NSObject doesn't currently inherit from Object (according to current header), I though it should be implicit, but they even redefined the 'isa' member ...
3rd: in NSObject it's methodForSelector: & respondsToSelector: while in Object it is methodFor: & respondsTo:, so, strictly speaking it's not really the same method.

However I won't be surprised if internally they simply call to the parent Object version.
why such a change ?
would I be an OPeNSTeP engineer whose boss I said 'we will make a new object ! a cleaner object', well I will do just that ...
_______________________________________________
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.
References: 
 >Re: What's with these redundant methods ? (From: MarketLogix Developer <email@hidden>)

  • Prev by Date: Re: What's with these redundant methods ?
  • Next by Date: Re: What's with these redundant methods ?
  • Previous by thread: Re: What's with these redundant methods ?
  • Next by thread: Re: What's with these redundant methods ?
  • Index(es):
    • Date
    • Thread