re: Go 2 Draft: Generics VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Yikes, the syntax is uglier than I had feared. Parens for everything. Everything looks like a function call. I guess if you take an ugly language...
 

I think that the idea is that it should look like a function call. So calling something like Sum(int) would be a "function call" that returns a func ([]int) int

I agree that it's a lot of parentheses in the definition, but hopefully type inference is good enough that the parentheses aren't needed much at the call site, if at all.

code of conduct - report abuse