any is the practical abstract root of the Avail type lattice. It is the second most senior type, inferior only to
⊤. It includes every value available to an Avail program. The only value that is not an instance of
any is the unexposed special value
any is made extremely useful by semantic restrictions. Many algorithms can be codified once in terms of
any, or some type parameterized by
any, and then strengthened via a semantic restriction that extrapolates a stronger result type from the argument types.
any is the most general type that may appear in the following contexts:
- As a parameter type of a function definition or function type.
- As the read type of a variable type.
- As a leading type or the default type of a tuple type.
- As the element type of a set type.
- As the key type or value type of a map type.
- As the attribute value type of an object type.
- As the type parameter of a POJO type.
|||||Return to Type System|||||