DEV Community

Discussion on: Why do some languages disrupt some common and habitual conventions?

Collapse
 
rhymes profile image
rhymes • Edited

There's an explanation in the official Go blog - blog.golang.org/gos-declaration-sy.... Basically they chose that syntax because it's easier to read.

var books [5]string

reads as "declaring a var named books as an array of 5 strings"

Collapse
 
perigk profile image
Periklis Gkolias

That makes sense :)