roam/20201008164835-structural_typing.org

15 lines
755 B
Org Mode
Raw Normal View History

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
[[file:20201008164956-type_system.org][Type System]] in which type compatibility and equivalence are determined by the
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
2020-10-09 05:56:12 +00:00
Structural type systems can achieve [[file:20201009010321-static_type_checking.org][static]] [[file:20201008164244-duck_typing.org][Duck Typing]], in that a type's
structure is what determines its suitability, not its name.