1. A few definitions
Types can be divided into two categories. The so-called primitive types are those of basic data directly supplied by the machine, such as the integers or Booleans mentioned above. Compound types, on the other hand, are constructed from one or more types. The most classic examples of compound types are container types, such as arrays or lists, but products (e.g. records) and unions of several types are also compound types. C structures are examples of product types, and algebraic types, which can be defined in OCaml, correspond to discriminated unions. Elements such as objects can also be seen as belonging to compound types, by classifying objects exhibiting the same methods within the same type. Belonging to a type is often not exclusive, especially when it comes to objects: if we consider that having at least one specific set of methods is equivalent to belonging to a type T of objects,...
You do not have access to this resource.
Exclusive to subscribers. 97% yet to be discovered!
Already subscribed?
Log in!
Ongoing reading
A few definitions