Hacker News new | ask | show | jobs
by slashnull 4035 days ago
Ha! Cunningham's law.

I see that many OOP languages (of various purity) have interfaces that may be extended by other interfaces. Is that what you're talking about?

I also found that *variance is used in the context of Haskell, but it seems to be far from being widely used.

Haskell being my template of a language with a good-looking interplay of polymorphism and algebraic typing.

1 comments

variance is used in Haskell all the time. Haskell's subtyping/type-subsumption relation is less pervasive than an OO language's, but it's critical. Furthermore, variance is more fundamental than subtyping. It is not at all a stretch to say that the type mechanics of function composition are based on contravariance/covariance matching.