flâneur — a map of the web's best reading

Go's Declaration Syntax - The Go Programming Language

go.dev · 1,171 words · saved by 1 readers

Why Go's declaration syntax doesn't look like, and is much simpler than, C's.

Go's Declaration Syntax - The Go Programming Language The Go Blog Go's Declaration Syntax Rob Pike 7 July 2010 Introduction 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. C syntax 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. Thu

Explore this link on the map →

related reading