The idea behind their parentheses are that it should act like a function - calling Max(int32) returns a func(int32, int32) int32. To call this function, one could do Max(int32)(x, y), or with type inference, Max(x, y) will work fine.
Then to declare a function that takes type parameters, it should ideally look similar to calling it: func Max(type T)(i1, i2 T) T.
That is the justification for all of the parentheses. I'm not sure if I entirely agree with it, but I'm not against it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can they please use <> for types just like Java or C++? These paranthesis are not readable!
The idea behind their parentheses are that it should act like a function - calling
Max(int32)
returns afunc(int32, int32) int32
. To call this function, one could doMax(int32)(x, y)
, or with type inference,Max(x, y)
will work fine.Then to declare a function that takes type parameters, it should ideally look similar to calling it:
func Max(type T)(i1, i2 T) T
.That is the justification for all of the parentheses. I'm not sure if I entirely agree with it, but I'm not against it.