|
|
|
|
|
by tathougies
2947 days ago
|
|
A lattice is a partial ordering where any two elements have a supremum and infinum. I.E., for any two types in avail's lattice, there is a unique super type, and a unique sub type. A partial ordering means that -- given any two elements -- I can say that either one is a subtype of the other or that the types are not in relation. The super type of every type is known as 'top', and the sub type of every type is known as 'bottom'. An infinite lattice just means that there is an infinite amount of types in the Avail type system. |
|
Languages like Java (and many more) fail to even have a top type, which leads to kludgey add-ons to the type system — boxed, @Nullable, erased generics, annotations, dependency injection, purity annotations, etc., all of which should have been part of a single type system.