Re: Abstract classes and methods
Re: Abstract classes and methods
- Subject: Re: Abstract classes and methods
- From: Chris Gehlker <email@hidden>
- Date: Wed, 29 Aug 2001 06:44:02 -0700
On 8/29/01 2:39 AM, "Ondra Cada" <email@hidden> wrote:
>
Chris,
>
>
>>>>>> Chris Gehlker (CG) wrote at Tue, 28 Aug 2001 21:47:15 -0700:
>
CG> But in ObjC every class is a descendent of NSObject:
>
>
that's not true. See eg. NSProxy.
>
>
CG> you never define the top of the tree.
>
>
that's true, unless you do really strange things.
>
>
CG> Even a class that functions as a
>
CG> pure virtual class is going to have to define init as [super init] and
>
CG> dealloc as [super dealloc]
>
>
That's not true: *if* you implement a virutal class, there is no need to
>
bother with init/dealloc of it. Actually, you can forget that also for
>
classes which are *not* abstract at all, but just happen to have no
>
"constructable/destructable" properties.
Can you? What if you derive from it? How does its parent constr/destr get
called when you construct/destruct a child class.
--
Laws are the spider's webs which, if anything small falls into them they
ensnare it, but large things break through and escape. -Solon, statesman
(c. 638-c558 BCE)