2 ms·
"put them in front of the type" I meant the [], not just generally the type. go: data []byte most (all?) other languages that use [] in arrays: data byte[]
by azinman2 14y ago
"put them in front of the type"
I meant the [], not just generally the type.
go: data []byte
most (all?) other languages that use [] in arrays: data byte[]
- kibibu 14y agoSorry I misinterpreted. When Go was introduced a lot of people got caught up in the declaration order being opposite to C-style languages and I assumed you had too. Nevertheless, it's similar to Algol's bracket syntax, except in Algol the type comes before the variable: []INT numbers = (0, 1, 2);