The article discusses the concept of conservative codomain conjecture in API design and explores the implications of being liberal in what one accepts and conservative in what one sends. It focuses on the 'Average' method as an example and provides insights into modelling contracts, error-handling, and the choice between liberal and conservative approaches. The article concludes that it is generally better to choose the design with a conservative codomain to ensure robustness and extensibility.
Table of contents
An average example #Modelling contracts #Error-handling #Liberal domain #Conservative codomain #Choosing between the two alternatives #Isomorphism #Encapsulation #Mapping #Pipes #Additive extensibility #Conjecture #Conclusion #Sort: