Math 2.0

Concept

Intersection type

Summary

In type theory, an intersection type can be allocated to values that can be assigned both the type σ\sigma and the type τ\tau. This value can be given the intersection type σ∩τ\sigma \cap \tau in an intersection type system. Generally, if the ranges of values of two types overlap, then a value belonging to the intersection of the two ranges can be assigned the intersection type of these two types. Such a value can be safely passed as argument to functions expecting either of the two types. For example, in Java the class Boolean implements both the Serializable and the Comparable interfaces. Therefore, an object of type Boolean can be safely passed to functions expecting an argument of type Serializable and to functions expecting an argument of type Comparable.

Further reading

  1. Wikipedia, page 24140211, revision 1374885617, Intersection type. adopted
About this page
TagR4PQ6VXER6
URIm2://R4PQ6VXER6
Aliasescomparison-of-languages-with-intersection-types, comparison-of-programming-languages-intersection-types
Kindconcept
WritingW1 stated
Same as
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W2

  • edge defines in: at least one definition (0 of 1)
  • edge instance_of in: at least two examples (0 of 2)
  • edge not_instance_of in: at least one non-example (0 of 1)
  • edge specializes both: the more general notions and the special cases (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.