3 ms·
Not even. To date, while I've learned about and understand contravariance and covariance, I haven't really needed to distinguish between the two in code I've wr
by shadowfiend 15y ago
Not even. To date, while I've learned about and understand contravariance and covariance, I haven't really needed to distinguish between the two in code I've written. I also haven't really needed to distinguish between them in code I'm writing.
The thing about type signatures is that if they're set up properly, you rarely have to think about them. Only when your assumption and the reality of a type system disagree do you have to look up why that's happening. And then you can look up covariance and contravariance is necessary.
But then, that's just the learning approach that works for me. Call it `Just In Time learning or `Agile learning'. `Learn learning', even...