Plain old covariance and contravariance

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Wed Oct 18 11:42:36 PDT 2006


BCS wrote:
> Jari-Matti Mäkelä wrote:
>> BCS wrote:
>>
>>>
>>>
>>> This would also allow a single class to implement several (3rd party)
>>> interface that have methods with the same signature but different
>>> semantics.
> [...]
>>
>>
>> It's better to use naming conventions to avoid these kind of semantic
>> collisions.
> 
> Yes that is the first solution, but some times that isn't an option,
> consider using 3rd party, closed source libs.

Yeah, I know. But still a "proper" solution would need some extra
semantical information attached to the method signature in some way or
another.

I have not done any large scale commercial (~=closed source)
development, but even in open source solutions you very often have to
break down objects that implement several interfaces into several classes.



More information about the Digitalmars-d mailing list