[go-nuts] Re: const vs global variables in go

2017-08-25 Thread T L
On Wednesday, August 23, 2017 at 8:49:39 AM UTC-4, Alkesh Ghorpade wrote: > > Hi All, > > I am new to Go and trying to figure out difference between const vs var > variables memory usage and initialization. > > I have following go code > // way 1 > var a = []string{"abc", "def"} > > // way 2 > c

[go-nuts] Re: const vs global variables in go

2017-08-23 Thread Volker Dobler
Variables and constant are totally different things. Work through https://tour.golang.org/basics/8 ff and https://tour.golang.org/basics/15 ff Memory usage and copy behaviour are not interesting until you are comfortable with the basics of the language. V. On Wednesday, 23 August 2017 14:49:39