Why #golang devs like single-letter variable names so much? I really hate it!

@__pity__ The official Go guidelines suggest method receivers be one or two letter names: https://go.dev/wiki/CodeReviewComments#receiver-names

Granted this doesn't extend to variables. I agree with you I prefer something more descriptive and explicit for the sake of clarity when reading code.

Go Wiki: Go Code Review Comments - The Go Programming Language

@definitepotato yes, that's a shame.

I see single-letter variables not only for method receiver, I don't know why they like it so much. A prefer self as a method receiver, btw.

@__pity__
I think short names of the variables are fine if the lifetime of these variables is short, like to be used in a loop, etc. For functiin/method signatures I like to be explicit with the names.
@definitepotato
@zylad @definitepotato i only use well-known single letter variable for loops, like i, j, or k.

@__pity__
Sometimes I also use short names (1-2 letters) if the variable is only used once or twiced. For instance if I have []byte and need to unmarshal it to get a struct, usually I would name that []byte something short because it's just intermediate state that does not affect the context. The unmarshalled data obrained from this []byte would have a proper name.
@definitepotato

Edit: s/marshal/unmarshal/