Re: Re: aggergate vs MI
| From: | Yasuo Ohgaki | Date: | Tue, 09 Apr 2002 00:14:25 +0000 |
| Subject: | Re: Re: aggergate vs MI | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82306@lists.php.net to get a copy of this message | ||
Brad Lafountain wrote:
*SNIP*
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. class a { function blah() { echo "in a"; } } class b { function blah() { echo "in b"; } } class c { function blah() { echo "in c"; } } class d extends a,b,c { function blah() { echo a::blah() . b::blah() . c::blah(); } }With MI, documentation can be generated easily using tools. *EASIER* to maintain code.
how do you do that with aggregation? MI really is way different than aggregation. I see aggregation used for adding methods to an existing class. class a { function do_a() { } } class b { function do_b() { } } $c = new stdclass; aggregate($c, "a"); aggregate($c, "b"); $c->do_a(); $c->do_b();With aggregate, auto generating documentation hard. *HARDER* (very hard, if one use it w/o good reason) to maintain code To me, aggregate is "GOTO" like feature. It's useful for sure, Howver _Never_ use unless there is very good reason. Therefore, it worth to have both MI and aggregate. IMHO -- Yasuo Ohgaki
but i still don't like this... there are cleaner ways around that by using members and/or MI. - Brad __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/