This is where confuses me the most while learning go. We all know that methods on T
only affect the copy of T
, and methods on *T
will affect the actual data on T
.
Why does methods on T
can also be used by *T
, but the opposite is not allowed? So,can you give me an example(or reason) on why they do not allow method on *T
be used by T
?
What is the pros and cons of this design?