3 ms·
The issue w/ calling it "config" is that you end up with the confusing scenario where "config" is the object and "Config" is the type, differing only in casing.
by akerl_ 8y ago
The issue w/ calling it "config" is that you end up with the confusing scenario where "config" is the object and "Config" is the type, differing only in casing.
- pcwalton 8y agoWhy is that confusing? Local variables are, idiomatically, never capitalized in Go, so the distinction is obvious at a glance.
- rat9988 8y agoAs are unexported objects.
- ben0x539 8y agoYeah, getting to idiomatically capitalize names has been pressure to move them to their own package in the past, which feels awkward.
- akerl_ 8y agoSorry. To clarify: it's not that I'm confused by the distinction between capitalized vs uncapitalized, it's that visually, "config" and "Config" look quite similar at a glance, whereas "c" and "Config" are clearly visually distinct.
- bpicolo 8y agoThis is a fairly go-specific issue due to its unexported vs exported convention. Many languages solve this through case conventions