3 ms·
No. When references or arrays of references are treated as contravariant, you would have the opposite problem of ArrayReadException. You can now store things in
by kccqzy 9y ago
No. When references or arrays of references are treated as contravariant, you would have the opposite problem of ArrayReadException. You can now store things into arrays safely but you can no longer extract things from arrays safely.
- fnl 9y agoConsumers are contravariant in Scala, but producers are covariant. EDIT: Good reference: https://www.atlassian.com/blog/software-teams/covariance-and-contravariance-in-scala https://www.atlassian.com/blog/software-teams/covariance-and...