scala_school2 icon indicating copy to clipboard operation
scala_school2 copied to clipboard

Least upper bounds issues

Open christydennison opened this issue 11 years ago • 0 comments

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 ???.

christydennison avatar Jul 09 '13 22:07 christydennison