We can test that strict values were copied by just changing the neg value in one of them.
https://play.golang.org/p/7FlMtfjfgY
Now we can see that those two big.Ints are pointers to different locations in memory. But they both happen to point to the same []uintptr.
What other behaviour can we get out of this situation.
https://play.golang.org/p/-5Nxz3tJnr
If we modify b using setString(...) we can see that a is also modified. But in a very odd way. I am not sure exactly what is happening here, but I would expect that b's value is built up step by step inside its []uintptr slice internally until that slice is found to be too short and a new slice is allocated to store the really big number we put in that string. But while we built up b's value we were also modifying a's []uintptr, leaving garbage inside a.
Copying values using the *a = *b is really useful. But a rule is that you only ever do it when you know exactly what you are copying. There is probably a stronger rule of thumb here that you shouldn't copy like this between types that you don't control (i.e. you wrote them yourself with this use in mind).
F
I have no idea what happened to the formatting of this email. After I copy and pasted from golang.org everything just got out of hand.
If anyone can clarify why big uses uintptr for nat I would be interested to know. To me it seemed unexpected, but looks so deliberate there must be a good (and interesting) reason.
:)