Thank you! That gives me clarity. On Monday, June 6, 2022 at 9:41:03 AM UTC+3 Jason Phillips wrote:
> Not currently. See the "omissions" section of the proposal [1]: > > > No parameterization on non-type values such as constants. This arises > most obviously for arrays, where it might sometimes be convenient to > write type Matrix[n int] [n][n]float64. It might also sometimes be useful > to specify significant values for a container type, such as a default value > for elements. > > > [1] - > https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#omissions > > On Monday, June 6, 2022 at 2:33:58 AM UTC-4 amitl...@gmail.com wrote: > >> Hi, >> Is it possible to set a generic type parameter of "T array of any size" >> (not slice)? Something like: >> func foo[A [...]T, T constraints.Integer](a A) { >> m := map[A]string{} >> ... >> } >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9f465b0b-732d-4b89-9138-798d246e1d58n%40googlegroups.com.