3 ms·
I'm afraid many of the conventions you complain about are standard Go, err, conventions... (Although see my complaint elsewhere.) Because they are so widely use
by Jabbles 14y ago
I'm afraid many of the conventions you complain about are standard Go, err, conventions... (Although see my complaint elsewhere.) Because they are so widely used, people who use Go won't bat an eyelid. Unfortunately that doesn't make the article a great introduction to Go.
I hope these talks can help sell you on Go http://blog.golang.org/2013/01/two-recent-go-talks.html http://blog.golang.org/2013/01/two-recent-go-talks.html
To be more explicit:
Short variable names generally reflect the idea that you know what a variable is for just by knowing its type. Thus you have a file named f, a time t, a variadic argument called v. When the type is not enough, a longer name is recommended. Naming things is hard though...
The hardcoded date is a wonderful piece of the time package, which I fully appreciate will look bizarre at first. (And therefore isn't a great thing to use in a first look at Go, without explanation). See the official documentation http://golang.org/pkg/time/#pkg-constants http://golang.org/pkg/time/#pkg-constants
- deleted 14y ago[deleted]