12 ms·
> There's also the fact that the array (I'm guessing) of bytes diverges from every other language to put them in front of the type which looks like crap. Every
by kibibu 13y ago
> There's also the fact that the array (I'm guessing) of bytes diverges from every other language to put them in front of the type which looks like crap.
Every other language except:
- Actionscript, TypeScript, Haxe
var x:int = 10;
- ML, OCaml, Haskell and derivatives
val x : int = 10;
- Pascal and derivatives
Var x : Integer;
- Ada and derivatives
x : integer := 10;
- Old-school MASM Assembly syntax
DSEG segment
x word
- SQL
CREATE TABLE tbl { x INT }
- Basic
Dim x as Integer
- XML DTDs even
<!ELEMENT x (#PCDATA)>
- azinman2 13y 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 13y 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);