<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Subtyping on Artur Rios Lab</title><link>https://lab.artur-rios.tech/tags/subtyping/</link><description>Recent content in Subtyping on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 00:03:00 +0000</lastBuildDate><atom:link href="https://lab.artur-rios.tech/tags/subtyping/index.xml" rel="self" type="application/rss+xml"/><item><title>What Is the Liskov Substitution Principle? Subtypes, Contracts and the Promises a Base Class Makes</title><link>https://lab.artur-rios.tech/concepts/liskov-substitution-principle/</link><pubDate>Wed, 21 Oct 2026 00:03:00 +0000</pubDate><guid>https://lab.artur-rios.tech/concepts/liskov-substitution-principle/</guid><description>&lt;p&gt;A function that sorts a list of shapes by area has never heard of the square.&#10;It was written against a base type, and it will be handed whatever subclasses&#10;exist now and whatever subclasses someone writes next year. Whether it keeps&#10;working depends on a promise nobody wrote down: that every one of those classes&#10;behaves the way the base type said it would. The &lt;strong&gt;Liskov substitution&#10;principle&lt;/strong&gt; is that promise, made explicit. It is the third of the five SOLID&#10;principles, and this is part 3 of a &lt;a href="../../series/solid/"&gt;series on SOLID&lt;/a&gt;.&#10;This article explains what the principle says, where it came from, the rules a&#10;subtype has to keep, the violations that ship inside widely used platforms, and&#10;how to repair one. Every output shown here was produced by running the code on&#10;Windows 11, with Python 3.14.6, mypy 2.4.0 and the .NET 10 SDK, not written by&#10;hand.&lt;/p&gt;</description></item></channel></rss>