Hacker News new | ask | show | jobs
by fnord77 1652 days ago
I see they went with []. Scala does this and it annoys me because [] also denotes arrays. Unlike <> which doesn't have any overloaded meaning.
1 comments

They wrote about the syntax a while back, one reason they avoided <> is that they lack parse-time type information to properly differentiate between certain cases like:

  a,b := w < x, y > (z)
There are two valid parsings of that if generics use <> and at parse time it isn't known which one to use. Either:

  a, b := [boolean expression w < x], [boolean expression y > (z)]
or

  a, b := [generic function w] [with parameters <x,y>] [applied to (z)]
https://groups.google.com/g/golang-nuts/c/7t-Q2vt60J8