I am almost sure of that but I want to be 100% sure. Because this seems weird after JS/PHP.
type Vertex struct {
X, Y float64
}
func (v Vertex) Scale(f float64) {
v.X = v.X * f
v.Y = v.Y * f
}
So is it true that a deep copy (emphasize on this) of v Vertex
parameter will be made on every Scale
invocation? And therefore, we should use pointer receivers instead of value receivers in order to avoid the deep-copying?
And the same applies to parameters, right? What are other places where the copying happens?