3 ms·
Don't know Go but I'm going to give it a shot: 1. Casing is a personal preference, so that's fair, but not a valid criticism. 2. Type decls after the variable
by traes 6y ago
Don't know Go but I'm going to give it a shot:
1. Casing is a personal preference, so that's fair, but not a valid criticism.
2. Type decls after the variable are much easier to parse, and allow for (easier) type inference.
3. Yeah? References exist... C/C#/C++ have them too.
4. This ones a fair criticism.
5. That's because constants have a completely different syntax from variable assignment.
6. The parenthesis are syntactically unnecessary and add nothing, the curly braces are required for an unambiguous parser (barring significant whitespace).
7. This is true in almost every language with for loops. Try it in the JavaScript console in your browser.
8. Yeah? So?
9. The scoping is a feature, not a bug. E.G.
if v := getResult(); v == Success {
Print("Success!")
} else {
Print("Failed with error code ", v)
}
// v doesn't pollute namespace out here
10. That one I'm not educated enough to make a reply to.