Re: [go-nuts] Re: When initializing variables, copies of values are made?

2019-01-31 Thread Kurtis Rader
On Thu, Jan 31, 2019 at 8:46 PM 伊藤和也 wrote: > So in Go, > The meaning of "declare" is allocate memory for a variable and initialize > the variable explicitly or implicitly. > e.g. > var a int = 3 // "a" is explicitly initialized > var b int // "b" is implicitly initialized > You should

[go-nuts] Re: When initializing variables, copies of values are made?

2019-01-31 Thread 伊藤和也
So in Go, The meaning of "declare" is allocate memory for a variable and initialize the variable explicitly or implicitly. e.g. var a int = 3 // "a" is explicitly initialized var b int // "b" is implicitly initialized The meaning of "assign" is give a copy of a value to a variable e.g.