Skip to content

IMSoP/variance-pipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Overview

People are often confused by exactly when a class should be able to vary the contracts of its parent class, or an interface it inherits - something technically known as "covariance and contravariance".

Wikipedia has quite a good explanation, but it's very wordy, so I had the idea for a more visual explanation: functions as boxes, linked by pipes.

This is a Work In Progress, but maybe it will help someone get the idea.

Sections

Copyright

© Rowan Collins [IMSoP] http://rwec.co.uk

This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

About

An attempt to explain covariance and contravariance. Using ASCII art.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors