Intermediate
Go (Golang)
Q75 / 100
What is the difference between value and pointer method sets for interface satisfaction?
Correct! Well done.
Incorrect.
The correct answer is B) A pointer *T has the method set of both value and pointer receivers; a value T only has value receiver methods — so *T satisfies more interfaces than T
B
Correct Answer
A pointer *T has the method set of both value and pointer receivers; a value T only has value receiver methods — so *T satisfies more interfaces than T
Explanation
If Stringer is implemented with *T receiver, only *T satisfies Stringer, not T. You cannot take the address of an interface value to recover the original pointer.
Progress
75/100