Re: [go-nuts] Re: What does "nil implay?

2019-01-21 Thread Inanc Gumus
Actually, that's not the whole story. For example, take a look at this example: https://play.golang.org/p/Wxq8vrBoqDr Inanc Gumus learngoprogramming.com On Mon, Jan 21, 2019 at 8:05 PM diego patricio wrote: > From stackoverflow, i think that is a proper explanation > > [im

Re: [go-nuts] Re: What does "nil implay?

2019-01-21 Thread Inanc Gumus
Nil = Uninitialized (slices, maps, channels, funcs etc) Nil = Doesn't point to anything (pointers) And so on. -- Inanc Gumus https://learngoprogramming.com On Mon, Jan 21, 2019 at 4:19 PM 伊藤和也 wrote: > So what do you think "nil" represents instead? > "nil" is ju

[go-nuts] Re: What does "nil implay?

2019-01-21 Thread Inanc Gumus
Nil value doesn't mean the absence of a value, because nil itself is a value. For example, a slice variable can hold the nil value, in that case, it means that the slice hasn't been initialized yet (that it has no backing array). On Monday, January 21, 2019 at 2:00:24 AM UTC+3, 伊藤和也 wrote: > >

Re: [go-nuts] The "declared and not used" error

2017-12-03 Thread Inanc Gumus
Hey, btw, you don't need a blank-identifier there, simply type: package main func main() { println("Hello world") for range [3]int{} { println("Yay") } } On Monday, December 19, 2011 at 1:18:33 AM UTC+3, Christoffer Hallas wrote: > > I have a hard time understand people who complain about this.

Re: [go-nuts] Re: Iota with string constants

2017-10-16 Thread Inanc Gumus
t when as you go along using your app, you > may need to add more values over time. > > using iota and stringer is great when your list may be 15 or more items, > and keeping them updated becomes a chore you would like to avoid. > > Regards, > > Diego > > > On Sunday,