Re: Refactoring tools available for Cocoa / ObjC?
Re: Refactoring tools available for Cocoa / ObjC?
- Subject: Re: Refactoring tools available for Cocoa / ObjC?
- From: Horst Hoesel <email@hidden>
- Date: Wed, 3 May 2006 17:19:20 +0200
Ondra,
Horst,
On 3.5.2006, at 15:44, Horst Hoesel wrote:
I am afraid not for ObjC though, for there are no abstract
classes there
I didn't quite follow this thread, but I'm pretty sure that ObjC
has a concept of abstract classes the most prominent being
NSObject :)
Nope, you can freely instantiate and use NSObject (just like *any*
other class) in Objective C. There is absolutely no concept of an
abstract class in the language.
There are in a sense "abstract" classes in the API, namely clusters
(NSArray, NSString, etc.). There, though, the abstraction is
ensured runtime (generally re-implementing init and alloc, other
ways possible): a re-factoring tool has no way to determine whether
it is so indeed or not.
Well, depends on how you define abstract class:
a) a class that _cannot be_ instantiated, or (e.g. C++ a class with
pure virtual functions, Java abstract class)
b) a class that _never is_ instantiated
I'll agree that NSObject (and any other) class can be instantiated as
there is no formal definition (and/or syntax construct) for an
abstract class in ObjC, but the concept is there. A class that never
is instantiated but serves as a superclass for others is an abstract
class in my eyes.
Cheers,
Horst
_______________________________________________
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