User loginNavigation |
(newbie question) Covariance and contravarianceFirstly I don't have any theoretical background in Category Theory. My goal is just trying to understand the following:- On wikipedia, A covariant type operator in a type system preserves the ordering ≤ of types. A contravariant operator reverses ≤. If neither of these apply, the operator is invariant. These terms come from category theory. What is type operator referring to in the context say Java ? The array type is usually covariant on the base type. Would I be right to say that the type operator is the assignment operator ? String[] a = new String[1]; Object[] b = a; Thanks. By chihiro at 2008-01-07 03:16 | LtU Forum | previous forum topic | next forum topic | other blogs | 10369 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 17 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago