Hacker News new | ask | show | jobs
by zeveb 2521 days 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 …

1 comments

It'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) { … }