In this chapter, it uses traits and an inheritance feature to illustrate subtyping, but this can be confusing since readers may associate subtyping with trait bounds/objects. The example is very similar to typical usage of dynamic dispatch, so I suggest changing the example to use structs instead, and explicitly describe the model as inheritance, rather than vaguely describing it as an "extension to the language".
Edit: After seeing how others are finding the same ambiguity, I will flesh out this issue to better review the chapter.
Edit 2: Initial pass done. Most of this section suffers from over-explaining, ambiguous antecedents, contradictions, lack of transitions, convoluted explanations, lack of explanations, re-descriptions of previously described concepts, and much more.
In this chapter, it uses traits and an inheritance feature to illustrate subtyping, but this can be confusing since readers may associate subtyping with trait bounds/objects. The example is very similar to typical usage of dynamic dispatch, so I suggest changing the example to use
structs instead, and explicitly describe the model as inheritance, rather than vaguely describing it as an "extension to the language".Edit: After seeing how others are finding the same ambiguity, I will flesh out this issue to better review the chapter.
Edit 2: Initial pass done. Most of this section suffers from over-explaining, ambiguous antecedents, contradictions, lack of transitions, convoluted explanations, lack of explanations, re-descriptions of previously described concepts, and much more.