On Tuesday, January 5, 2021 at 1:29:01 PM UTC-5 Brian Candler wrote:
> On Tuesday, 5 January 2021 at 18:17:14 UTC tapi...@gmail.com wrote: > >> What about if the custom generic function syntax is consistent with built >> ones? >> For example: >> >> v := MakeMyMap(mymap[T1]T2) >> > > Would this be mandatory for all generics which take two or more types? It > seems unbalanced to me. Not everything is a hash-like container with a key > and value. > > Silly example: > > func blah[T1]T2 (x T1) T2 { ... } > > x := blah[int]string(123) > I didn't see anyone propose this syntax from the above comments. > > I think the current draft is clearer: > > func blah[T1, T2] (x T1) T2 { ... } > > x := blah[int, string](123) > > -- 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/236996ef-a872-4fcc-90ab-0c80722d953cn%40googlegroups.com.