Re: [go-nuts] [generics] Generic functions calls little confusing to readers

2020-06-17 Thread Randall O'Reilly
Here's a proposal for a syntactic modification to the draft proposal that removes explicit type parameters from functions, and just uses generic types directly (e.g., the new interface types): https://github.com/golang/go/issues/39669 This would go a long way toward simplifying the syntax and a

Re: [go-nuts] [generics] Generic functions calls little confusing to readers

2020-06-16 Thread Ian Lance Taylor
On Tue, Jun 16, 2020 at 2:54 PM Alexander Morozov wrote: > > For example consider this example https://play.golang.org/p/rfccpBoFIJN > There is no generics involved, but for person reading the code there will be > additional cognitive load to recognize that it's returned closure call and > not g

[go-nuts] [generics] Generic functions calls little confusing to readers

2020-06-16 Thread Alexander Morozov
For example consider this example https://play.golang.org/p/rfccpBoFIJN There is no generics involved, but for person reading the code there will be additional cognitive load to recognize that it's returned closure call and not generic function call. I wonder how could we avoid this confusion (ap