3 ms·
> If you had to guess which of the mainstream languages has the most advanced support for variance in their type system, Python probably wouldn't be your first
by nayuki 8y ago
> If you had to guess which of the mainstream languages has the most advanced support for variance in their type system, Python probably wouldn't be your first guess, right?
When the author wrote this statement, I think they didn't consider type bounds in Java - for example:
void addAll(Collection<? extends E> coll)
void getAll(Collection<? super E> coll)
Don't forget this (ahem) beauty:
<T extends Comparable<? super T>> void sort(List<T> list)