PseudoInterface
PseudoInterface is a term used in software design to describe a construct or pattern that exposes a defined set of methods and properties that an object should provide, without requiring an explicit interface declaration. It represents a contract by convention rather than by language-enforced nominal types. The concept is common in languages that support duck typing or structural typing, and it is used to enable polymorphism across otherwise unrelated types.
In dynamically typed languages, pseudo-interfaces rely on duck typing: if an object implements the expected methods,
Advantages of using pseudo-interfaces include flexible code design, easier decoupling, and improved documentation and testing. They
See also: duck typing, interface, structural typing, Protocol (Python), static typing.