3 ms·
Go actually has a fair amount of syntactical sugar, the language design document has a fair amount of "ooh! And we did this cool thing to save you from typing a
by krakensden 16y ago
Go actually has a fair amount of syntactical sugar, the language design document has a fair amount of "ooh! And we did this cool thing to save you from typing an extra line!"
- jbarham 16y agoI especially like "short variable declarations" (aka type inference, http://golang.org/doc/go_spec.html#Short_variable_declarations http://golang.org/doc/go_spec.html#Short_variable_declaratio...). Just type one more character than you would in Python for assignments, but you get static typing.
- masklinn 16y agoYes, an other exceptionally new feature invented by the Go masters which nobody had ever thought about before.