Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



#scala #variances
the type defined by the class Stack[T] is subject to invariant subtyping regarding the type parameter.
If you want to change selection, open document below and click on "Move attachment"

Variances - Scala Documentation
ns may be added when a class abstraction is defined, whereas in Java 5, variance annotations are given by clients when a class abstraction is used. In the page about generic classes an example for a mutable stack was given. We explained that <span>the type defined by the class Stack[T] is subject to invariant subtyping regarding the type parameter. This can restrict the reuse of the class abstraction. We now derive a functional (i.e. immutable) implementation for stacks which does not have this restriction. Please note that this is


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.