• 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: Refactoring tools available for Cocoa / ObjC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refactoring tools available for Cocoa / ObjC?


  • Subject: Re: Refactoring tools available for Cocoa / ObjC?
  • From: glenn andreas <email@hidden>
  • Date: Wed, 3 May 2006 11:30:50 -0500


On May 3, 2006, at 11:22 AM, Greg Titus wrote:
The reason is that, just again, whilst in Smalltalk there can be some (whatever sweet way unknown to me they are achieved and detected), in ObjC *there are no abstract classes*. Period. You encounter NSObject instances pretty often, a few times I've even instantiated NSArrays. I haven't ever instantiate an NSString, but I bet some other one did :) And so forth.

NSObject and NSArray are not abstract. NSString, on the other hand, is. If you don't see the distinction, then no wonder you aren't thinking about this very well.


How do figure that "NSString" is abstract but "NSArray" isn't? As far as I'm concerned, none are abstract, since, other than the fact that there is no "abstract class" in Objective-C, with all of them you can instantiate them, send them messages, etc...:


x = [[NSObject alloc] init]; NSLog(@"%@", [x description]); [x release];

x = [[NSString alloc] init];
NSLog(@"%@", [x description]);
[x release];

x = [[NSArray alloc] init];
NSLog(@"%@", [x description]);
[x release];

I will agree than NSArray and NSString are class clusters, but neither fact makes them abstract classes (their clusteriness being entirely an implementation detail), and certainly doesn't make NSString abstract and NSArray not.


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Refactoring tools available for Cocoa / ObjC?
      • From: Greg Titus <email@hidden>
References: 
 >Refactoring tools available for Cocoa / ObjC? (From: "Eric Lin" <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Marcel Weiher <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: "Eric Lin" <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Ondra Cada <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Marcel Weiher <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Ondra Cada <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Marcel Weiher <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Ondra Cada <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Horst Hoesel <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Ondra Cada <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Greg Titus <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Ondra Cada <email@hidden>)
 >Re: Refactoring tools available for Cocoa / ObjC? (From: Greg Titus <email@hidden>)

  • Prev by Date: Fwd: saveGraphicsState vs. lockFocus
  • Next by Date: Re: Efficiently getting characters
  • Previous by thread: Re: Refactoring tools available for Cocoa / ObjC?
  • Next by thread: Re: Refactoring tools available for Cocoa / ObjC?
  • Index(es):
    • Date
    • Thread