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
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