Microsoft’s Component Object Model (COM) is a method of developing small executable components to provide services for applications, operating systems, and other components. The first component developed, Object Linking and Embedding (OLE), was used to embed a spreadsheet in a word processor. Other uses of COM are to communicate data and commands between programs dynamically and to generate dynamic HTML code that is capable of invoking other components. COM itself is not a language, but it specifies interfaces between (possibly distributed) components written in almost any language.
This paper describes how implementations of three language extensions provide access to COM through automatic code generation, such as wizards in Visual C++ (MSVC); hardwired language changes provided by the vendor in Visual J++ (JVM); and standard dynamic language features in the fully object-oriented language Dylan.
The authors, who are members of the Dylan development team at Harlequin, note that COM, MSVC, and JVM are all Microsoft products, and that Microsoft recommends using them together. They point out disadvantages of each of these implementations, including opaque, fragile MSVC code and rigid JVM components that require specialized compiler and runtime support. They claim that using Dylan to write components provides programming ease at least equal to each of the other two, and overcomes their disadvantages. Sample code for Dylan and C++ is shown.