|
Posted by Sanders Kaufman on 07/23/07 13:17
Jerry Stuckle wrote:
> Michael Fesser wrote:
>> It's been a long time since I worked with Java and C++, but it looks
>> like you're right in these cases. I came from the Pascal/Delphi world;
>> in Object Pascal you have to explicitly call inherited constructors and
>> destructors.
>
> Object Pascal is not a true OO language. It's an OO extension to a
> structured language (and not a real good implementation at that - there
> are several holes in the way it is implemented). The ones I mentioned
> are true OO languages.
I may be getting too far out of scope here, but I seem to recall some
PHP guys getting all uppity about PHP not being true to OOP. Is there
anything to that, and if so, is it significant?
Of course - I may be thinking of waaay back when PHP stood for "Personal
Homepage Processor".
> No, Micha, it is improper OO. The base class is depending on something
> form the derived class. Additionally, in proper OO, A::data would be
> private to the base class. And the constructor for A would be called
> before the constructor to B ever got started.
I gotta say, even in my sophomoric understanding - that just makes good
sense.
OOP lives and dies on compartmentalization. If you build two
interdependent classes, then neither one can ever be an object unto
itself. That may be class-oriented, but it darn sure ain't object-oriented.
Navigation:
[Reply to this message]
|