Documents Packages The Project Help Blog The Go Programming Language Share Memory By Communicating Go Programming session video from Google I/O golang.org Install Go A Tour of Go Go Documentation Go Mailing List Go on Google+ Go+ Community Go on Twitter Blog index The Go Blog Go's Declaration Syntax 7 July 2010 Newcomers to Go wonder why the declaration syntax is different from the tradition established in the C family. In this post we'll compare the two approaches and explain why Go's declarations look as they do. First, let's talk about C syntax. C took an unusual and clever approach to declaration syntax. Instead of describing the types with special syntax, one writes an expression involving the item being declared, and states what type that expression will have. Thus int x; declares x to be an int: the expression 'x' will have type int. In genera...