You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we can add a section mentioning this feature to give the newer codebase another choice – no need to write such a hint explicitly? This feature makes us no longer need to write C-style comments anymore, since maintaining a separate comment can be easily out-of-sync with the original parameter name, and writing such a comment is a bit uninteresting for this IDE era, I think.
The text was updated successfully, but these errors were encountered:
These hints also won't work on other editors like vim/neovim/etc. Last time I checked Go developer survey, there's still a nontrivial number of these users (over 20%, IIRC).
Related part: https://github.com/uber-go/guide/blob/master/style.md#avoid-naked-parameters
Both VS Code (with Go extension) and GoLand have provided “inlay hints” that can show every parameters name:
I wonder if we can add a section mentioning this feature to give the newer codebase another choice – no need to write such a hint explicitly? This feature makes us no longer need to write C-style comments anymore, since maintaining a separate comment can be easily out-of-sync with the original parameter name, and writing such a comment is a bit uninteresting for this IDE era, I think.
The text was updated successfully, but these errors were encountered: