Short identifiers: A lot of Go code, including the snippets in the documentation, is plagued by extremely short identifiers. Those are used as local variables, function arguments, method receivers, and even structure members. Combined with the heavy use of interfaces, it is hard to read the code: What’s a c? And an r? And an s.wg? Yes, there is bad code all around, but when the official language documentation seems to recommend this approach, you can expect that others will follow the apparent recommendation in all cases.
I also don’t get their obsession with using very short names. Also the use of very common short names for the default packages is annoying as it pollutes the namespace. Things like “user”, “url”, “bytes” are package names, which means they can’t be used as variable names. So instead of writing something clean like user := user.Current() one has to write something like u := user.Current(). I know it’s possible to use aliases for the package names but it’s not an ideal solution. By default, common names shouldn’t be reserved like that.
user := user.Current()
u := user.Current()
Also the use of very common short names for the default packages is annoying as it pollutes the namespace. Things like “user”, “url”, “bytes” are package names, which means they can’t be used as variable names.
IMO “user” is a bad variable name - “current_logged_in_user” or “authenticated_user” sure. the only time I think user is good as a variable on its own would be when you’re doing a loop over a list of users, or working in a tightly scoped function, and in either of those cases u seems just as good to me.
But I think my fundamental objection to your argument: what should the package that works with bytes be called if not bytes?!
[Comment removed by author]
You have to advertise to the target audience. Rockstars have expectations :P
There’s actually a “GitHub project” button on the mobile version of the website that goes directly to the Microsoft/vscode repo: https://i.imgur.com/Fo3W90O.png
Don’t know why it’s absent on the desktop site.
It’s enough to click the “Star” button (it doesn’t do anything except link to the GitHub page); definitely not obvious!