3 ms·
That's probably a better way of explaining the behaviour. My point was more that this pattern is a very common way of getting a pointer to a primitive type valu
by cyphar 5y ago
That's probably a better way of explaining the behaviour. My point was more that this pattern is a very common way of getting a pointer to a primitive type value (since you can't just do &5 in Go). It seems likely that Go would optimise this to just creating a stack allocated value.