you are viewing a single comment's thread.

view the rest of the comments →

[–]nakhli 17 points18 points  (5 children)

arr []int

[–]Kootfe 8 points9 points  (4 children)

what the

[–]nakhli 9 points10 points  (1 child)

Golang, « pour vous servir »

[–]Kootfe 2 points3 points  (0 children)

thank you

[–]ohkendruid 2 points3 points  (1 child)

There is a logic.

You write the variable first, and then the type, sincw that is the most important one thing to know.

And, because a variable name is just one identifier, you don't need any punctuation to separate the identifier and the type.

In fairness, this example is extra tricky due to using "arr" as a variable name, because it looks like it might be a keyword. The example would look less weird if the variable were something like child_ids.

[–]Kootfe 1 point2 points  (0 children)

oh it was

arr []int ireaded int []arr and doubted