
The Fourth Type of Variance - pplonski86
https://www.benjamin.pizza/posts/2019-01-11-the-fourth-type-of-variance.html
======
acjohnson55
I read about this concept before, I think here:
[https://typelevel.org/blog/2016/09/19/variance-
phantom.html](https://typelevel.org/blog/2016/09/19/variance-phantom.html)

------
comex
Also known as bivariance.

------
afranchuk
I too haven't seen invariance used much, however recently I had a case where
my data type (in Haskell) encapsulated both serialization and deserialization
from a base type, and in this case the only way to "convert" the data type's
type parameter was with an invariant transformation. This turned out to be a
very elegant way to define a type that could be converted to and from yaml
(though both directions were optional), because then the data type also stored
the _specification_ of the expected yaml input(s) (since converting to and
from other types won't change the original yaml representation).

------
cvs268
OT: What's with the the .pizza domain? Any particular reason?

I clicked half-expecting some math behind people's choice of toppings

------
jayd16
Does Java's type erasure/wild cards count as bivariance/phantom variance?

