Go versus C declarations

old-comics
syntax
Published

November 14, 2023

An early try at programming-with-cartoons, in the spirit of _why’s Poignant Guide. Current work is at home.

In C we declare variables by writing examples of how we’d use the variable, whereas in Go write the variable name and then the type. This keeps simple types readable while making complex types more readable, read more on Rob Pikes excellent article https://go.dev/blog/declaration-syntax