Re: Re: aggergate vs MI
| From: | Zeev Suraski | Date: | Tue, 09 Apr 2002 05:59:45 +0000 |
| Subject: | Re: Re: aggergate vs MI | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82310@lists.php.net to get a copy of this message | ||
At 01:51 09/04/2002, brad lafountain wrote:
But do you see my point that having ONLY aggregate means that in 90% of the case where people will use it its probally a bad idea. They are only using it becuase of the lack of MI. How does aggregation solve overwriting methods.Yes, I see the point...
but i still don't like this... there are cleaner ways around that by using members and/or MI.I really don't know - as far as I know, aggregation is really not about runtime, but about 'has a', vs. 'is a'. When you have 'hard' compiling, i.e., a phase that turns source code into a binary component, aggregation helps keep a loose relationship between objects, but it's still done in compile time of the new, 'derived' or constructed class: class aggregated_class {
var $inner_object;
function aggergated_class()
{
$this->inner_object = new inner_class();
}
function inner_method()
{
return $this->inner_object->inner_method();
}
}
Zeev