Re: [go-nuts] Short Variable Declaration Question

2016-11-23 Thread adonovan via golang-nuts
On Friday, 18 November 2016 10:30:45 UTC-5, Ian Lance Taylor wrote: > > I think the book is trying to stress that it declares out but does not > declare err. I agree that the sentence seems to imply that it does > not assign a value to out, but in fact it does both declare out and > assign a

Re: [go-nuts] Short Variable Declaration Question

2016-11-18 Thread Ian Davis
I think the sentence is supposed to read something like this: "The second declares out (and assigns to it as before) but only assigns a value to the existing err variable (without declaring it)" On Fri, Nov 18, 2016, at 03:02 PM, Terry McKenna wrote: > Hi Guys, > > I am reading "The Go

[go-nuts] Short Variable Declaration Question

2016-11-18 Thread Terry McKenna
Hi Guys, I am reading "The Go Programming Language": Donovan, Kernighan (pg.31): "One subtle but important point: a short variable declaration does not necessarily declare all the variables on the its left-hand side. If some of them were already declared in the same lexical block then then the