Hacker News new | past | comments | ask | show | jobs | submit login

This a topic that also comes up in linear algebra. Is there any analogy between vectors and types, or is the terminology just coincidental? https://en.wikipedia.org/wiki/Covariance_and_contravariance_...



It's not a coincidence. The terms “covariance” and “contravariance” ultimately come from category theory.


According to Wikipedia:

> The terms "covariant" and "contravariant" were introduced by James Joseph Sylvester in 1853 in the context of algebraic invariant theory, where, for instance, a system of simultaneous equations is contravariant in the variables.

https://www.jstor.org/stable/108572


Next you're going to say "natural," "functor," and "category" come from category theory, too! :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: