2021-07-29 22:51:04 +00:00
:PROPERTIES:
:ID: c16eb203-290f-4644-8f18-725ffad15e92
:END:
2020-10-08 21:22:51 +00:00
#+title : Structural Typing
#+begin_quote
A structural type system (or property-based type system) is a major class of
2021-07-29 22:51:04 +00:00
[[id:c90b53a0-62f7-4115-a417-85e22f55d83d ][Type System ]] in which type compatibility and equivalence are determined by the
2020-10-08 21:22:51 +00:00
type's actual structure or definition and not by other characteristics such as
its name or place of declaration. Structural systems are used to determine if
types are equivalent and whether a type is a subtype of another.
--- https://en.wikipedia.org/wiki/Structural_type_system
#+end_quote
2021-07-29 22:51:04 +00:00
Structural type systems can achieve [[id:1882370a-e4df-42a3-ab5a-32b650b754a6 ][static ]] [[id:c50025bd-6942-4a78-b448-ea6fda2925fd ][Duck Typing ]], in that a type's
2020-10-09 05:56:12 +00:00
structure is what determines its suitability, not its name.