On Thursday, 23 September 2021 at 18:07:19 UTC+1 kziem...@gmail.com wrote:

> Understand this whole text without running code in compiler is just above 
> my mediocre (at best) programming skills. Compilers errors are one of mine 
> favorite teachers.


You can try out examples online in the go2 playground:
https://go2goplay.golang.org/
 

> "inferred as Pair(int){1, 2}". Maybe I still don't understand this 
> proposal enough, because I think it should be "Pair[int]{1, 2}".
>

An older version of the generics proposal used round parentheses for the 
type parameters, so a generic function call could look like "myfunc(int, 
string)(a, b)" when you weren't inferring the types.  This was changed to 
square brackets later.  I guess this comment is something that was missed.

-- 
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/0429f448-df3a-4adb-8c38-a6233d9af7f2n%40googlegroups.com.

Reply via email to