3 ms·
Not certain I like that this is now valid Go: func Foo (type T) (t T) (t T, err error) { … } Seems like an awful lot of parentheses in a single line! It'
by zeveb 7y ago
Not certain I like that this is now valid Go:
func Foo (type T) (t T) (t T, err error) { … }
Seems like an awful lot of parentheses in a single line!
It's a bit tricky to read, because 'generic function' here means something subtly different from what 'generic function' means in CLOS …
- mseepgood 7y agoIt's not more parentheses than in a method definition: func (a A) Foo(x int) (n int, err error) { … } Also your line isn't formatted properly. It should be: func Foo(type T)(t T) (t T, err error) { … }