3 ms·
> Maybe internally it clones these references -shrug. That's what go does under the hood in 95% of cases. If I do: func foo(a int) *int { return
by maccard 4y ago
> Maybe internally it clones these references -shrug.
That's what go does under the hood in 95% of cases. If I do:
func foo(a int) *int {
return &a
}
func main() {
fmt.Println(*foo(3))
}
It does the right thing. It's just that in this case (and in lambdas) they got it wrong.