Is there a reason Go is not using <> instead of ()?
So instead of
func Print(type T)(s []T) { for _, v := range s { fmt.Print(v) } }
we would get
func Print<T>(s []T) { for _, v := range s { fmt.Print(v) } }
?
So instead of
func Print(type T)(s []T) { for _, v := range s { fmt.Print(v) } }
we would get
func Print<T>(s []T) { for _, v := range s { fmt.Print(v) } }
?
Foo<Bar>
You still don’t know whether this is a bunch of comparisons or a parametric type, meaning you need either feedback from the type checker into the parser or possibly unbounded lookahead before you can even generate a parse tree.https://go.googlesource.com/proposal/+/refs/heads/master/des...