Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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[]



Sorry 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);




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: