Function types variational

Function types variational

 

Type variable describes the line with the relevant type Richter substitution principle, after a type variable compliance and how compliance with the substitution principle Richter feature.

After generating a new type of structure types.

 

Type variable itself is a type constructor.

Type variable describes the characteristics constructor;

 

 

 

Inheritance covariance inverter:

         c ++, java, scala support covariant return value, that is to say when the superclass inheritance class hierarchy neutron coverage, the return value can be specified more specific type. c # does not support return values ​​covariant.

The inverter parameter allows object-oriented languages ​​is not much --c ++, java, scala and c # will regard it as a function overloading.

 

https://www.cnblogs.com/feng9exe/p/9760625.html

 

Function parameters: in line with the inverter;

Return value: covariant;

Guess you like

Origin www.cnblogs.com/feng9exe/p/11430028.html