<div dir="ltr">On Wed, Jul 30, 2008 at 3:06 AM, Frank Benoit <span dir="ltr">&lt;<a href="mailto:keinfarbton@googlemail.com">keinfarbton@googlemail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
interface I {<br>
}<br>
class C : I {<br>
 &nbsp;override int opEquals(Object o){<br>
 &nbsp; &nbsp;writefln(&quot;opEquals&quot;);<br>
 &nbsp; &nbsp;return true;<br>
 &nbsp;}<br>
}<br>
<br>
void main(){<br>
 &nbsp;I i1 = new C;<br>
 &nbsp;I i2 = new C;<br>
 &nbsp;bool a = ( i1 == i2 );<br>
 &nbsp;writefln( &quot;result %s&quot;, a );<br>
}<br>
<br>
prints<br>
result false<br>
<br>
This is highly unexpected.<br>
Sure one might understand that with the knowledge of interface/class incompatibility in D. But this shows once more, that D has a Bug here.<br>
<br>
<br>
<br>
</blockquote></div><br>What is the reason that COM interfaces need to pretend to be D interfaces in the first place?&nbsp; As opposed to some special COMInterface type.&nbsp; I can&#39;t really think of any situation where you would need to treat a COM interface and a regular interface the same way without knowing that one was a COM interface.&nbsp; Or at least in a way that it would matter.&nbsp; For instance you could write a template that takes either a COM interface or a D interface, but in that case you generally won&#39;t care what the thing is underneath.<br>
<br>Can someone enlighten me?&nbsp; I&#39;ve never really been able to understand what problem is supposed to be solved by conflating D Interfaces and COM interfaces.<br><br>--bb<br></div>