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

2021-04-13 Thread tapi...@gmail.com
More immutable value proposals: https://github.com/go101/go101/wiki/Go-immutable-value-proposal-list On Sunday, April 11, 2021 at 8:47:31 PM UTC-4 Kurtis Rader wrote: > This has been formally requested several times. For example: > > https://github.com/golang/go/issues/20443 > https://github.com

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

2021-04-11 Thread Kurtis Rader
This has been formally requested several times. For example: https://github.com/golang/go/issues/20443 https://github.com/golang/go/issues/22876 I'm also willing to bet you are basing your request on experience with a language such as C. Adopting ideas from other languages is fine but blindly, an

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

2021-04-11 Thread 'Vladimir Efanov' via golang-nuts
Hi Go-Masters It will be very useful to get constant arrays in Golang. Programmers asked about it for years . For now we all should write not exported array definitions and exported functions to get read access to it. *What we need* const *M*yArray = [n]T = {...} or initMyArrayFunc() *What we