<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OOP on Jack Mordaunt</title><link>https://mordaunt.dev/site/tags/oop/</link><description>Recent content in OOP on Jack Mordaunt</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 01 Aug 2025 06:26:18 -0300</lastBuildDate><atom:link href="https://mordaunt.dev/site/tags/oop/index.xml" rel="self" type="application/rss+xml"/><item><title>What is an Interface</title><link>https://mordaunt.dev/site/posts/what-is-an-interface/</link><pubDate>Fri, 01 Aug 2025 06:26:18 -0300</pubDate><guid>https://mordaunt.dev/site/posts/what-is-an-interface/</guid><description>&lt;p&gt;&lt;strong&gt;Behavioral Polymorphism: The foundation of OOP.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;interface&lt;/strong&gt; is the foundation of OOP (Object Oriented Programming).&lt;/p&gt;
&lt;p&gt;It provides &lt;em&gt;behavioral polymorphism&lt;/em&gt;: constraining a type by its behaviours -
or more secifically, its method-set.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A &amp;ldquo;method&amp;rdquo; (as termed in OOP langauges) is nothing more than a procedure who&amp;rsquo;s
first argument is a pointer to the object it is associated with. There is
nothing special about a method.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definitions&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Poly&lt;/strong&gt;: many&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mono&lt;/strong&gt;: singular&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Morphism&lt;/strong&gt;: shape&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;: having many shapes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monomorphism&lt;/strong&gt;: having one shape&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Polymorphic refers to the ability to represent many shapes.&lt;/p&gt;</description></item></channel></rss>