Re: Re: aggergate vs MI
| From: | Zeev Suraski | Date: | Tue, 09 Apr 2002 16:23:32 +0000 |
| Subject: | Re: Re: aggergate vs MI | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82391@lists.php.net to get a copy of this message | ||
At 14:03 09/04/2002, Wez Furlong wrote:
On 09/04/02, "Zeev Suraski" <zeev@zend.com> wrote: COM's a hack, though. It really is. What they did in ATL basically does a fair amount of magic to give you the ability to inherit code with COM's strict binary compatible model... COM implemented in C/C++ is, as you say, a hack.It was born there, after Microsoft figured out that dynamic libraries were really hellish :)
When the language supports COM style interfaces natively, it starts looking less like a hack and more like something really nice.Well, I guess it's a matter of perspective, but I think that it's no coincidence they moved away from COM :)
There is another point that keeps coming to mind when comparing MI with interfaces: method name conflicts. Consider this, using an MI approach to implementing interfaces:[snip] Hmm, you refer to interfaces a-la COM? Hmm, I was under the impression that if we use interfaces, it'll be the same as Java, and then what you said about naming conflicts doesn't apply at all. QueryInterface() is a hack, which may have a positive side effect (avoids naming collisions), but it's still a hack :) Zeev