Hi, Why do we have to allow people to write something like `w<x,y>(z)` or `w(x,y)(z)` or `w[x,y](z)`? It's not "go-style" stuff. Something more in "go-style" should be:
``` wxy := w<x,y> a, b = wxy(z) ``` It is much more clear and elegant, just like what we have for error handling. In this way, brackets would not be narrowed in the same single line, thus being friendly to read. And we would not meet the ambiguity problem. 在 2020年7月15日星期三 UTC+8上午5:56:01,gri写道: > > PS: For ambiguities with angle brackets consider the assignment > > > a, b = w < x, y > (z) > > > Without type information, it is impossible to decide whether the > right-hand side of the assignment is a pair of expressions > > > (w < x), (y > (z)) > > > or whether it is a generic function invocation that returns two result > values > > > (w<x, y>)(z) > > > In Go, type information is not available at compile time. For instance, in > this case, any of the identifiers may be declared in another file that has > not even been parsed yet. > -- 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/3a6c1c05-d716-4d13-ba7e-837ae238154eo%40googlegroups.com.