Re: [go-nuts] Re: "for ... range" over array of structs copies values

2017-09-01 Thread Wojciech S. Czarnecki
On Fri, 1 Sep 2017 07:32:34 -0700 (PDT) mspre...@us.ibm.com wrote: > that a variable is considered _addressable_ and that's all there is to it. > Now, in C and other such languages, there is a critical distinction about > addresses that is relevant: is the address on the stack or on the heap?

Re: [go-nuts] Re: "for ... range" over array of structs copies values

2017-09-01 Thread Ian Lance Taylor
On Fri, Sep 1, 2017 at 7:32 AM, wrote: > > This just bit me. I wonder if the discussion above missed the critical > point. Looking at https://golang.org/ref/spec#Address_operators, I see that > a variable is considered _addressable_ and that's all there is to it. Now, >

[go-nuts] Re: "for ... range" over array of structs copies values

2017-09-01 Thread mspreitz
This just bit me. I wonder if the discussion above missed the critical point. Looking at https://golang.org/ref/spec#Address_operators, I see that a variable is considered _addressable_ and that's all there is to it. Now, in C and other such languages, there is a critical distinction about