scala_school2
scala_school2 copied to clipboard
Least upper bounds issues
Located at Data and Control Flow > Type Inference > Least Upper Bounds (LUB)
Define LUB before you use it. Best to define acronyms before you use them, even if it is the acronym of the title.
Section's example of weak conformance is not clear. Does this mean I can convert a char to an Int if they weakly conform? What is the relevance of LUB? Maybe say that you can convert a char to an Int because a char is only two bytes, and an Int is 4, so you don't lose information by converting one to the other. However, it's "weak" conformance because char and Int can only be converted to one another, and don't have other properties that you'd have in "strong" conformance, such as ???.