var i int var i = 10 var i,j = 10, 11
Why can’t they just be…
i int i :=10 // outside of function / method -- hope i will be auto deducted to int. i,j := 10, 11
I understand, it could have been just as
i, j = 10, 11 but by using
:=, we differentiate between general
is equal to & auto type deduction, however, keyword
var I think looks unnecessary, things that aren’t
const qualified implicitly means they could be changed.
Moreover, why Go isn’t allowing auto type deductions like
i:=10 outside of function / method body.