The Performance of Arrays - Chris Burrows - 2 views
-
arrays of reference types are covariant in their element type, but not safely
-
where did that exception come from? It came from the runtime, which was in a unique position to know what the real type of the array object was, and the real type of the element. It needed to determine if the assignment was allowable and throw if not. Now if you think about this for a minute, you can see that it’s going to have to perform that check for every assignment to an array element
-
arrays are covariant only for reference types?
- ...3 more annotations...