Eiffel for .NET part 2. Following up the first part of Bertrand Meyer’s Eiffel.NET series detailing how the Eiffel.NET compiler shoehorns multiple inheritance into the .NET single inheritance model. As I suspected it’s a complete hack. The base classes become interfaces with separate implementation and creation classes. The consumer of the classes has to rely on documentation rather than language features to understand how to instantiate one of the base classes. The method Meyer described implements polymorphism but does not allow for mixin functionality which I presume has to be done via aggregation.
What the common object model provides is not a stranglehold forcing all languages to support a single view, but a kind of language bus, enabling all languages to cooperate by agreeing on a basic set of common mechanisms. With the multiple inheritance example, we were able to present to the bus, and hence to other languages, a view that doesn’t lose any essential property of the original model.