News for hackers. Stuff that matters.
Re:Covariance and Contravariance: a fresh look at an old iss... by hardmath123 on Tuesday May 17, 2016 @06:17PM (#11718003)
The way I explain variance is with a "bakers and chefs" example. Chefs turn ingredients into food and bakers turn dough into bread. Since dough is an ingredient and bread is a food, you may think all bakers are chefs. But this isn't true, because a chef should be able to handle any ingredient, and a baker may not necessarily know what to do with broccoli.

There are no comments on this comment yet.