HaloO,

I don't understand why theory.pod states that roles are covariant, unary
theories and factories are contravariant. I would expect the opposite from
the requirement that all functions in roles only take the topic type while
function in factories only return the topic type.

So if A <: B, I would expect Role{B} <: Role{A} and Factory{A} <: Factory{B}
on the following rational. Thinking of A beeing a proper subset of B we
get the reverse relation for their complements because parts of the outside
of A are inside of B. Functions in roles have type (R --> None(R)) and
functions in factories have type (None(F) --> F) with R and F the implicit
topic types of the role and factory respectively. Normal arrow subtyping
rules then result in roles beeing *contravariant*, unary theories and
factories beeing *covariant*, unary theories.

OTOH, theory.pod talks about the topic type appearing in the invocant
position of methods of roles, which subtypes covariantly. Note also that
the return type is covariant. So I neither understand the part about roles
having methods that return the type the role defines.

Thanks in advance for clarification.
--

Reply via email to