On Wed, Jun 17, 2020 at 9:35 AM hao luo <haozzzzz...@gmail.com> wrote: > > 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.
Let's try the current syntax and see how it works out. https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#why-not-use-the-syntax-like-c_and-java Ian -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVuQdKY%3DXUULryVDOVNUDN2-xsF%2BjucJFhWngJALQAAUg%40mail.gmail.com.