Re: [go-nuts] Re: Give us const arrays please :)

2021-04-12 Thread Henry
Thanks for the information. I did not know that. It's good to learn something new. :) On Monday, April 12, 2021 at 7:17:05 PM UTC+7 wagner riffel wrote: > On Mon Apr 12, 2021 at 5:04 AM -03, Henry wrote: > > The example you gave is actually a map[rune]bool in Go, and not an > > array. I > > It's

Re: [go-nuts] Re: Give us const arrays please :)

2021-04-12 Thread 'wagner riffel' via golang-nuts
On Mon Apr 12, 2021 at 5:04 AM -03, Henry wrote: > The example you gave is actually a map[rune]bool in Go, and not an > array. I It's a Go array in form of a composite literal, see https://golang.org/ref/spec#Composite_literals -- You received this message because you are subscribed to the Googl

[go-nuts] Re: Give us const arrays please :)

2021-04-12 Thread Henry
The example you gave is actually a map[rune]bool in Go, and not an array. I don't think C's array work like that too. I think you are confusing Go with other languages. In addition, arrays are rarely used in Go. Many people prefer using slices. On Monday, April 12, 2021 at 6:33:47 AM UTC+7 vlad