Group: type inheritance
Topic: data type as a set of values
Topic: data type as a set of variables
Topic: data type compatibility
Topic: dynamic vs. static data type
Topic: generic operations and polymorphism
Topic: non-hierarchical classification and multiple classification
Topic: object-oriented data types
Topic: ref_any or Object data type
Topic: type checking by trademark
Topic: union data type
Topic: variant data types
| |
Summary
An object can have more than one type just as it can have more than one classification. Non-exclusive data types increase flexibility but can decrease the amount of type checking. It is particularly useful for object-oriented programming.
A non-exclusive data type defines a set of data objects, e.g., by a predicate or by intervals. This is more natural because everything has multiple classifications. It allows operations and representation to be specified separately. Since an object can be in many classes, may have to dynamically check its current class.
A non-exclusive data type for a parameter makes an operation polymorphic. (cbb 1/90)
Subtopic: overlapping types and multiple inheritance is needed
Quote: in object-oriented programming, multiple inheritance is very useful; if not provided, it is approximated [»wolfW9_1989]
| Quote: types should be non-exclusive [»kentW_1978]
| Quote: an entity can participate in multiple types; e.g., both numbers and characters are ordered sets [»smitJM1_1981]
| Quote: polymorphism allows overlapping value sets which cover the universal value set
| Subtopic: type as a predicate, abstract, intension
Quote: a type is a predicate defining a class of interpretations of abstract objects [»kiebRB9_1973]
| Quote: a type is the abstract idea of a set (its intension), not its contents [»kentW_1978]
| Quote: prefer predicate view of types over partition view; e.g., 3 is simultaneously a real, an integer, a positive integer, etc. [»pratV1_1983]
| Quote: a predicate type system allows multiple types for a value; used in interactive languages such as Lisp
| Quote: a data type may partition a domain (disjoint) or use a predicate (overlapping sets) [»cartR1_1985]
| Quote: a data type is a predicate over an infinite set [»flonL9_1974, OK]
| Quote: traditional set theory defines sets by their contents -- not relevant to types [»kentW_1978]
| Subtopic: interval types
Quote: if treat types as intervals then identify those elements which do not belong to a type [»cartR1_1985]
| Quote: if data type by intervals not included then type information can be partial [»cartR1_1985]
| Subtopic: type checks
Quote: before using an object as a different class, need to check for the class [»palmJ5_1973, OK]
| Subtopic: behaves-like vs subsumes
Quote: separate inheritance of behavior (behaves-like) from inheritance of representation (subsumes)
| Subtopic: dynamic types
Quote: Pegasus objects have unique ids and one or more types; may change types dynamically [»ahmeR12_1991]
|
Related Topics
Group: type inheritance (13 topics, 394 quotes)
Topic: data type as a set of values (20 items)
Topic: data type as a set of variables (11 items)
Topic: data type compatibility (5 items)
Topic: dynamic vs. static data type (24 items)
Topic: generic operations and polymorphism (67 items)
Topic: non-hierarchical classification and multiple classification (16 items)
Topic: object-oriented data types (29 items)
Topic: ref_any or Object data type (9 items)
Topic: type checking by trademark (13 items)
Topic: union data type (12 items)
Topic: variant data types (7 items)
|