Showing posts with label invariance. Show all posts
Showing posts with label invariance. Show all posts

Sunday, 17 April 2011

Covariance, contravariance and invariance


In programming language conversion from narrower to broader type is of these types:
  • covariant: converting from wider (double) to narrower (float).
  • contravariant: converting from narrower (float) to wider (double).
  • invariant: Not able to convert.