Re: Re: aggergate vs MI
| From: | Zeev Suraski | Date: | Mon, 08 Apr 2002 21:11:11 +0000 |
| Subject: | Re: Re: aggergate vs MI | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82290@lists.php.net to get a copy of this message | ||
Having both makes very little sense. Compile-time vs. run-time in PHP doesn't make any real difference as far as functionality goes, because the stages are linked together immediately.
I don't think MI will make it into PHP, now that aggregation was introduced...
At 18:59 08/04/2002, brad lafountain wrote:
--- "Stig S. Bakken" <ssb@fast.no> wrote: On Mon, 2002-04-08 at 02:50, brad lafountain wrote:--- "Stig S. Bakken" <ssb@fast.no> wrote:of theOn Sun, 2002-04-07 at 20:35, brad lafountain wrote:What would be wrong with having the *_SQL_* objects be a membertheWhat do you mean... Im saying that the SQL implementation is a member or*_Connection* classes?What you're describing here is object aggregation.connection class.. Nothing to do with aggergation. aggergation would meanthemethods of the sql imp would be apart of the connection class not amember.Im still not convinced that aggergation is usefull.Object aggregation in general is a technique where you have some functionality in objects you forward calls to, a pretty common technique. You can of course do that in PHP today, but it's slow (lots of userland method calls) and high on maintenance (if an aggregated class gets a new method, you must make a new wrapper in the forwarding class, etc). In my opinion, providing "native" support for this in an efficient way makes a lot of sense for PHP. Ok, Im still not convinced that I personally will ever use aggregation but im sure someone out there somewhere would want to use it. But my consern is that people will start using aggregation instead of normal MI. Aggregation should only be used at certin times not just for MI. (as i said in another post) Basically I don't want aggergation to be the only way that a user can have MI just because MI isn't implemented. I can see users doing this. class A; class B; class C; $c = new C; aggergate($c, "A"); aggergate($c, "B"); Just because they "can". Not be cause it makes sence or its readable. I guess it would aleviate my conserns if MI was included as well as aggergation. (as i said in another post) - Brad __________________________________________________ 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