Why is MS-COM a language feature?

davidl davidl at 126.com
Tue Jul 29 18:47:37 PDT 2008


在 Wed, 30 Jul 2008 04:40:38 +0800,Frank Benoit  
<keinfarbton at googlemail.com> 写道:

> This is inspired by the question of Bill B. from the "Comparing  
> interfaces does not call opEquals" thread.
>
> Even Java can bridge to COM without language support. See SWT.
> So if it is possible to connect to COM with lib functions, why have it  
> directly supported by the language?
>

Maybe because Java Interface is pure. D interface is not pure, defaultly  
interface
not inherited from IUnknown, you get opEquals, opCmp, etc vtbl from class  
Object.
So it's better call it IPure, not IUnknown so windows specific(from the  
first view).

> Who of this community is actually using COM? How is your experience?  
> What is possible? What is not? Could it be done in a lib?
>

You can't get a pure interface without IUnknown compiler support.

> Wouldn't it make much sense to throw the COM support out of D entirely?
>



-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list