Better for who? You? I would to love to see `[]` instead of `()`, but `<>` are horrible to read IMO.
среда, 17 июня 2020 г., 19:36:09 UTC+3 пользователь hao luo написал: > > The creator: > > Hi, I am extremely interested in and eager for golang's generics, and I > have read the updated draft. > https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#acknowledgements > > I think use "<>" to declare template's type would be more appropriate. > > Original in the draft: > > func Print(type T)(s []T) { > // same as above} > > > My opinions: > > func Print<type T>(s []T) { > // same as above} > > > The reason: > 1. More clear to discriminate and generics to normal funcs and type. > 2. Use "<>" to declare type for generic code. > 3. Use "()" to declare running params. > > Wish you can give a thought to it. > > hao > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2412c48b-19bd-4b31-900c-704a044eb479o%40googlegroups.com.
