I heard someone say:
"Scala uses a type lattice, not a type hierarchy that is different from Java."
I don't quite understand what a value type lattice is and what is the main difference between a type hierarchy and a type hierarchy.
Can someone explain this term to me?
In essence, this means that: The type hierarchy for Scala is a lattice, that is, it has "bottom" as well as "top".
As you can see from the image, the top type is here Any and the bottom one is Nothing .
Any
Nothing