On Sat, 2002-04-06 at 11:21, brad lafountain wrote:
> 
> --- Yasuo Ohgaki <[EMAIL PROTECTED]> wrote:
> > Brad Lafountain wrote:
> > > I keep on hearing that "we" are totally against MI but "we" want the
> > aggergate
> > > function.
> > > 
> > >  Can someone PLEASE explain the reasoning behind such a decision?
> > > 
> > >  I can't think of one example when aggergate would be better than using MI.
> > 
> > Aggreation works now. Multiple inheritance needs changes in ZendEngine.
>  I am more than willing and capable to make such changes.
> 
> > 
> > BTW, some user asked multiple inheritance feature to php-dev, I replyed 
> > "Multiple inheritance is useful, but it makes a lot easier to design
> > objects badly. I think we are better to design objects so that
> > multiple inheritance is not needed"
>  This is somewhat true, but how does aggerate fix this?
> 
> > 
> > Then I got reply, "multiple inheritance is needed", etc, etc, but
> > nobody support my idea. Therefore, most of developers like multiple
> > inheritance, I suppose.
>  I like MI way more than i like aggerate.... I honistly think, as far as OO is
> conserned, aggergate is garbage.. imagine reading someone elses code... trying
> to figure out what objects do what... and you come opon line 150 where
> aggerate($circle, "Square");.. seriously.. IMHO this is garbage! 

So?  What if the object is overloaded?  What if it's some proxy class
and you don't even have _access_ to the code of the methods it would
call?  If people want to design shitty code, they will be able to with
or without aggregate.

> Unless someone could give me a real reason that aggerate is better than MI. I
> would consider aggerate a HUGE downfall of php!

MI is compile-time, aggregate is runtime.  That's a big enough reason
for me.

> Class definition is defined at design time not run time!

Aggregate is not really about class definition.  The shortcut in the
current implementation modifies the class definition, but in its basic
form, aggregation is about forwarding calls, not about changing class
definitions.  Thus my suggestion to change aggregate as in my first
reply to Kristian.

 - Stig


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to