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 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/138bbc26-2d51-4e48-a3b7-2d113cc54d65n%40googlegroups.com.

Reply via email to