--- Kristian Koehntopp <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 08, 2002 at 08:59:39AM -0700, brad lafountain wrote:
> > class A;
> > class B;
> > class C;
> > 
> > $c = new C;
> > aggergate($c, "A");
> > aggergate($c, "B");
> > 
> > Just because they "can".
> 
> Yes of course, but how is this better than
> 
> class D extends A, B, C;
> $d = new D;
> 
> for the same reasons (i.e. because you can as opposed to "it makes sense"???)

 Yeah now they can use D over and over agian with out having to aggregate it
over and over again because it IS defineable at compile time.

class circle;
class square;
class 3d_object;
class 2d_object;

class 3d_circle extends circle, 3d_object;
class 2d_square extends square, 2d_object;
class 3d_square extends square, 3d_object;

$obj1 = new 3d_circle;
$obj2 = new 2d_square;
$obj3 = new 3d_square;

that is way eaiser to read than..
class circle;
class square;
class 3d_object;
class 2d_object;

$obj1 = new circle;
aggregate($obj1, "3d_object");
$obj2 = new square;
aggregate($obj2, "2d_object");
$obj3 = new square;
aggregate($obj3, "3d_object");

Besides that you can re-use your 3d shapes over and over again. 

 Im saying that aggregate can be used (not too often) but having aggregate and
not MI would lead to the above code. Users using aggregate as an alternative to
MI. When it makes sence to do the inheritance at compile time not run time.

 - Brad

> 
> Kristian


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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

Reply via email to