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 09:33:42 -0700
On 8/29/01 7:11 AM, "Ondra Cada" <email@hidden> wrote:
>
Chris,
>
>
>>>>>> Chris Gehlker (CG) wrote at Wed, 29 Aug 2001 06:44:02 -0700:
>
CG> >That's not true: *if* you implement a virutal class, there is no need to
>
CG> >bother with init/dealloc of it. Actually, you can forget that also for
>
CG> >classes which are *not* abstract at all, but just happen to have no
>
CG> >"constructable/destructable" properties.
>
CG>
>
CG> Can you? What if you derive from it? How does its parent constr/destr get
>
CG> called when you construct/destruct a child class.
>
>
They would be inherited, of course. Where's the problem?
The problem is I read that damnable "Learning Cocoa" book and got confused.
>
We are in object-oriented environment, and so we have inheritance. It's that
>
simple.
>
>
Do forget the C++ constructor/desctructor nonsense; init/dealloc are quite
>
normal methods, in no way special (but by some conventions of using them).
>
Especially, they are inherited just like any other method is.
I would have been better off thinking C++. "Learning Cocoa made we think
that this worked like Obj Pascal.
Every once in awhile I have to vent about "Learning Cocoa". I feel better
now.
--
Heaven is under our feet as well as over our heads. -Henry David Thoreau,
naturalist and author (1817-1862)