recordtypes
Record types are a common composite data type that groups named fields, each with a type. A record value consists of a fixed set of labeled fields accessible by name. They model structured data such as a person’s profile or a coordinate pair.
Fields are defined at the type level; records are constructed by supplying values for each field. Depending
Typing varies by language. Some languages use structural typing, where two records are compatible if their
Record types are related to structs in imperative languages and to labeled algebraic data types in functional
Common examples include ML and OCaml records; Haskell records; TypeScript interfaces; Rust structs; Go structs; and