Closed kardwen closed 1 month ago
Thanks for the suggestion. The book doesn’t introduce the idea of supertraits until 19.2: Advanced Traits – Using Supertraits to Require One Trait’s Functionality Within Another Trait, so introducing the hierarchy here would require a bunch of extra explanation. I think it’s probably better to leave it as is, where someone who wants to dive deeper will find it in the documentation (as you did!) and folks reading linearly through the book will not have to think about that particular relationship. This is a weird/difficult balance to strike!
Okay, thanks! I hope I can finish the book soon and that the issues I have opened are not too much of an annoyance.
No annoyance at all – they’re informative about what is or isn’t working for individual readers, and even if we close them like this, we appreciate the consideration!
I found this explanation for FnMut in the documentation helpful, which explicitly points out the hierarchy of Fn traits, i.e. subtraits and supertraits:
Maybe this can also be added to chapter 13 where the Fn traits are introduced? It is kind of described in this sentence, but it did not immediately occur to me:
Maybe the following examples would be easier to understand if the relationship between
FnOnce
,FnMut
andFn
were made explicit a second time?