Could someone point out, what is the reasoning of putting types after variable names? i.e. why not `int i` instead of `var i int` ?
var x int
var foo map[string]int
var dummy []int
compared to var int x
var map[string] int foo
var []int dummyConsider: int* i, j (or rather int *i, j)
int* x, y;
when you meant to declare both x and y as int pointers, here only x will be a pointer and y will be a straight int.Obviously the go designers could have chosen to simply make this mean that both x and y are pointers, however this would be somewhat confusing for those familiar with C.
As iand says, there is a rather good article on this which goes into a lot more detail - http://golang.org/doc/articles/gos_declaration_syntax.html