Understanding variable scope in Go
I am going through the Go specification to learn the language, and these points are taken from the spec under " Declarations and scope ." Though I am able to understand points 1-4, I am confused on points 5 and 6: The scope of a constant or variable identifier declared inside a function begins at the end of the ConstSpec or VarSpec (ShortVarDecl for short variable declarations) and ends at the end of the innermost containing block. The scope of a type identifier declared inside a function begins at the identifier in the TypeSpec and ends at the end of the innermost containing block. This is