|
|
|
|
|
by jrockway
999 days ago
|
|
Go 1.18 had to run programs written for Go 1.17. What if this is your program: a, b = w < x, y > (z)
Is that "a, b = w[x, y](z)" (call function w of with type parameters x and y against z), or is it "a = w < x; b = w > (z)" (assign true to a if w is less than x, ...).With type information, this is possible to disambiguate, but the goal of the parser is to not require type information. Remember, now if you want correct syntax highlighting your editor has to have the type information, but you haven't typed that in yet! As always, I think they made the right choice here. |
|
Why?
It looks like a pretense at purity for the sake of purity.