Re: calling parent class method from the outside

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



admin wrote:
> Once again, calling the parent version of a method "externally" is
> allowed in C++ (and whoever said it was bad design should speak up to
> Bjarne Stroustrup ;-)) Any such trick in PHP?

I stand suitably corrected :)

I didn't realise you could do that in C++ to be honest. I'm trying to
think of a use of this feature in my many C++ programs but can't think
of a practical use of such a feature. I guess I'll have to think
differently when designing things but I can't help but think that one of
the major advantages of deriving classes is the extension and
abstraction of your models. If I can pick and choose which parent's
implementation of a given method is used then it could totally change
how the classes are supposed to function. I guess you can make the
parent methods protected but but would have other negative trade offs.

Ach, I'll have to go and dig out my old notes from Uni.

/me misses programming in C++ :(

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux