Re: Q's about Obj-C
Re: Q's about Obj-C
- Subject: Re: Q's about Obj-C
- From: Ondra Cada <email@hidden>
- Date: Mon, 15 Oct 2001 18:35:51 +0100
Joe,
>
>>>>> Joe Chan (JC) wrote at Mon, 15 Oct 2001 11:43:02 -0400:
JC> >4. You've opened a can of worms here :-) AFAIK you can't have
JC> >an abstract
JC> >class in Obj-C. Someone will probably go to great lengths to
JC> >tell you why
JC> >and attempt to make you feel stupid for even wanting to do it.
JC>
JC> The only reason I asked is because the documentation mention the
JC> abstract class all over the place (e.g. for NSObject, NSView),
JC> but doesn't define it anywhere. If abstract class is merely a
JC> conceptual thing in Obj-C, that's all right, just want to know
JC> the lingo.
Yep, in this sense an abstract class is something _generally_ intended to be
subclassed, *but* sometimes, if need be, instantiated without any problem --
eg. an instance of NSObject is a good placeholder.
In a C++ sense therefore none of these classes is abstract. A closest
equivalents to the C++ abstract classes are class clusters -- things like
NSString or NSNumber. See my previous message for few more details; see the
class clusters documentation for all of them ;)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc