Behavioral subtyping
id:
behavioral-subtyping-306-3046494
title:
Behavioral subtyping
text:
In object-oriented programming, behavioral subtyping is the principle that subclasses should satisfy the expectations of clients accessing subclass objects through references of superclass type, not just as regards syntactic safety but also as regards behavioral correctness. Specifically, properties that clients can prove using the specification of an object's presumed type should hold even though the object is actually a member of a subtype of that type. For example, consider a type Stack and a
brand slug:
wiki
category slug:
encyclopedia
description:
original url:
https://en.wikipedia.org/wiki/Behavioral_subtyping
date created:
date modified:
2023-11-27T21:29:17Z
main entity:
{"identifier":"Q94761372","url":"https://www.wikidata.org/entity/Q94761372"}
image:
fields total:
13
integrity:
13