Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 987 Bytes

File metadata and controls

22 lines (13 loc) · 987 Bytes

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.