On 04/09/2018 11:47 PM, Kagamin wrote:
On Tuesday, 4 September 2018 at 06:32:02 UTC, rikki cattermole wrote:
If D didn't have built-in OOP features already, it'd be an interesting question, but given that it does, I think getting rid of them is a clear net-negative.

You also loose loads of stuff like extern(C++) classes interop and COM. Definitely a net negative. Even with a concept like signatures, you just can't replace the class/interface system.

Even in betterC? Last I checked classes pulled TypeInfos and all the stuff. What's the problem to use COM without classes? I do it.

Being able to define and use COM as it was intended (via classes) is a feature of D.

Looks like it could be pretty straight forward to get it working in -betterC, since what it isn't complaining about is TypeInfo. Keep in mind, IUnknown is its own root, just like Object and has a completely different ABI for vtable's and such.

test.obj(test)
 Error 42: Symbol Undefined __D6object6Object8opEqualsMFCQtZb
test.obj(test)
 Error 42: Symbol Undefined __D6object6Object5opCmpMFCQqZi
test.obj(test)
 Error 42: Symbol Undefined __D6object6Object6toHashMFNbNeZk
test.obj(test)
 Error 42: Symbol Undefined __D6object6Object8toStringMFZAya
test.obj(test)
 Error 42: Symbol Undefined __D4test3Foo7__ClassZ

Reply via email to