News for hackers. Stuff that matters.
Re:5 Weeks of Go by to3m on Wednesday May 23, 2012 @02:34PM (#4014572)
Well, there's no ambiguity in this case, because "int" is a keyword, known to the compiler, and will always be interpreted as a type. But if you had something like "x*y,z", then the meaning of this would depend on whether x is a type or not.
Re:5 Weeks of Go by singular on Wednesday May 23, 2012 @03:31PM (#4014869)
I think this is more in reference to the common C error of:-

    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