Fix name
ambiguity in trait object diagram
#1292
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Oh, sorry, I misunderstood above.
<Dog as Pet>::name
is supposed to refer to theDog::name
method.Yeah, that is what the picture was supposed to show. I think "the heap" as "somewhere in memory". I guess the vtable is generated at compile-time and put somewhere in the binary — and then memory-mapped into the address space when the program is loaded from disk.
No, I actually think you got it!
I suggest we change the
name
method totalk
orspeak
in thePet
trait. The implementations can then be something likeThat would remove the
name
ambiguity. We should then also write notes to explain each part of the diagram.Originally posted by @mgeisler in #1270 (reply in thread)
The text was updated successfully, but these errors were encountered: