3 ms·
Underscore in globals. Is that really go best practice?
by nergal 7y ago
Underscore in globals. Is that really go best practice?
- tomohawk 7y agoYes. Variables that start with lower case look like a locally defined variable in a func. Adding the underbar makes it absolutely clear, and prevents shadowing, or the need to work around shadowing with a slightly different name.
- yencabulator 7y agoI've never heard or seen that, outside of this document. So I would say no, it's not a Go practice, it's an Uber practice.