I was wondering why the terms Covariance and Contravariance are named like that in programming domain. Usually one hears these terms in Probability theory or Statistics indicating the spread of quantities being measured with respect to the Mean.
- What is the idea for borrowing these terms from Statistics?
- How does these terms describe this spread in programming domain?
- What would be the Mean in programming domain?
I know that Covariance is the ability to assign an expression of a more specific type to a variable of a less specific type but, is there another interpretation for this?
Examples relating both these domains would be helpful.
Statistics
? It comes fromcategory theory
according to wikipedia. – Damascusin T
/out T
decision in C#; it is pretty intuitive that they mean, without having to remember which is which – Airscrew