News for hackers. Stuff that matters.
Re:Covariance and Contravariance by genug on Saturday November 21, 2015 @10:28AM (#10606986)
A contravariant object transforms like a vector.

A covariant object transforms like the gradient of a scalar.

Re:Covariance and Contravariance by Macha on Saturday November 21, 2015 @11:00AM (#10607073)
I understand these words, but not in the combination used.

I guess this is really simple to people with the nessecary maths background to understand this, but for me I just don't see the connection between vectors/gradients and type systems.

Re:Covariance and Contravariance by genug on Saturday November 21, 2015 @07:07PM (#10608537)
I don't think there is any connection. But since the submission was titled "covariant and contravariant" without any kind of context, it seemed appropriate that we could all share our own personal ideas about what these words were supposed to mean.
Re:Covariance and Contravariance by Macha on Sunday November 22, 2015 @10:26AM (#10610307)
Ok. the source of the confusion for me then was that I was not previously aware that covariant and contravariant were terms that could be applied to vectors.
Re:Covariance and Contravariance by cygx on Saturday November 21, 2015 @11:39AM (#10607180)
I just don't see the connection between vectors/gradients and type systems

There isn't really one besides the terminology.