Re: [BLACKBOX] foreign COM-objects part 2: inherit multiple interfaces

From: VDI <gunnar>
Date: Tue, 21 Dec 2010 13:10:36 +0100

----boundary-LibPST-iamunique-1911328503_-_-
Content-type: text/plain

Folks,

thank you for your comments. Perhaps you have answered my question,
 but unfortunately I do not understand how.


> I heard that multiple inheritance is one of the main reasons that
> C++ has severe performance problems in numerical applications.

My point was not multiple inheritance but inheritance of multiple
 interfaces (purely abstract classes / records). To my knowledge the
 problems with multiple inheritance lead to the design decision for
 the java (and C#) language not to support it. All that is allowed is
 that classes may share funtionality (properties and methods) by
 implementing multiple interfaces in contrast to inherting them from
 their base class.


> "Microsoft COM does not support multiple interface inheritance,
> but allows a component to support multiple interfaces
 simultaneously,
> to much the same effect"

This differentiation certainly IS way over my head.


> It is my understanding that one uses "mix in" instead of
> multiple inheritance.

This sounds like inheriting interfaces, except (quote from wikipedia):
"A mixin can defer definition and binding of methods until runtime..."

> [...] but C# only allows simple inheritance such as Componant [...]

The C# language definition states:
"An interface defines a contract. A class or struct that implements an
 interface must adhere to its contract. An interface may inherit from
 multiple base interfaces, and a class or struct may implement
 multiple interfaces."



So what's the bottom line?
Using a (perhaps sophisticated) COM-component works well from
 .NET/gpcp. Perhaps this requires late binding and reflection but
 these details are hidden by the interop component which is created by
 TlbImport.

Using the same component seems more complicated from BB. My personal
 guess is that the limitations in (Dev)ComInterfaceGen can not be
 worked around, because I can not find support for mix-ins or multiple
 interfaces or whatever at language level.

Is this correct in your opinion?


yours confusedly
gunnar


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1911328503_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0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HBhcg0KXHBhcg0KSXMgdGhpcyBjb3JyZWN0IGluIHlv
dXIgb3Bpbmlvbj9ccGFyDQpccGFyDQpccGFyDQp5b3VycyBjb25mdXNlZGx5XHBhcg0KZ3VubmFy
XHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2Fn
ZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5D
SH19AEkgaGU=
----boundary-LibPST-iamunique-1911328503_-_---
Received on Tue Dec 21 2010 - 13:10:36 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:26 UTC