Fragile ABI

David Piepgrass qwertie256 at gmail.com
Tue Aug 21 17:15:10 PDT 2012


>> I think the only reason we still use COM today is that, sadly, 
>> there is no other OO standard interoperable with all 
>> languages. C++ vtables are the closest competitor; I guess 
>> their fatal flaw is that there is no standard for memory 
>> management across C++ DLLs.
>
> Even .NET with his goal of supporting multiple languages has the
> CLS as the common set of datatypes and OO concepts to support 
> across .NET
> languages.
>
> Given that OO has so many types of possible implementations, it 
> is hard to implement an ABI that works across multiple 
> languages.

Sure, but .NET apps are not limited to CLS. Two different .NET 
languages can easily interoperate outside the rules of CLS (as 
long as it is still within the rules of .NET). Whereas operating 
beyond the limits of COM is much harder. Besides that, CLS itself 
is far more expansive than COM, allowing function overloading, 
inheritance, constructor arguments, etc.

It's unfortunate that .NET has limitations that make it hard for 
languages with novel features, like D, to fit in. (D could target 
.NET, of course, but there would be a significant cost, in terms 
of either performance, interoperability with other .NET code, 
and/or placing limitations on what D code can do.)

> Lets see how the improved COM (WinRT) turns out to be.

Sadly, WinRT is again intended to be Windows-only, so developers 
like me that hate lock-in will avoid it in preference for .NET 
(hi Mono!) and yucky old C.


More information about the Digitalmars-d mailing list