Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 21 and Version 22 of ComProgramming

Show
Ignore:
Author:
nascent (IP: 174.125.110.198)
Timestamp:
10/03/12 05:50:30 (7 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ComProgramming

    v21 v22  
    33== Introduction == 
    44 
    5 In 1988, on COM's fifth birthday, Don Box [http://www.microsoft.com/msj/0798/com0798.aspx bemoaned the state of COM]. Coming in for particular criticism was the C++ language mapping, which hadn't kept pace with the language itself. Comparing the ease-of-use available to Java programmers to the hoops through which those those using C++ have to leap, he envisaged being able to write code for COM in a way that was more natural to the language. It never transpired (or rather, it did, but in a vastly different form which we know today as .NET). 
     5In 1998, on COM's fifth birthday, Don Box [http://www.microsoft.com/msj/0798/com0798.aspx bemoaned the state of COM]. Coming in for particular criticism was the C++ language mapping, which hadn't kept pace with the language itself. Comparing the ease-of-use available to Java programmers to the hoops through which those those using C++ have to leap, he envisaged being able to write code for COM in a way that was more natural to the language. It never transpired (or rather, it did, but in a vastly different form which we know today as .NET). 
    66 
    77The D programming language would fair no better. It doesn't help with lifetime management (despite having built-in garbage collection), interface vending or event handling (despite offering delegates). Which leaves us back in 1998. Or even earlier. In C++, smart pointer techniques can not only provide RAII-like management but also wrap IUnknown-based interfaces. Struct inheritance enables you to extend the base COM types, such as VARIANT, with more features. ATL macros offer a simple way to sink events. D gives us a restrictive version of RAII, and none of the others.