Open pdewilde opened 5 months ago
I've found camel case to introduce weird edges, especially with proper nouns. httpRequest is fine, but myHttpRequest is weird. Or should it be myHTTPRequest, which is equally weird. apiVersion, APIVersion, or ApiVersion?
Snake case avoids all these pitfalls because it does not try to overload a casing change as a word boundary.
I would prefer snake_case as well. Unfortunately many other projects use camelCase. Even proto default marshal produces camelCase.
I guess my main argument for camelCase
is that js
usually uses it, so I would assume json
would have the same convention.
Based on a brief conversation I had added https://github.com/abcxyz/readability/wiki/JSON-Best-Practices#camelcase-over-snake_case to the wiki, but after receiving feedback preferring snake_case in a PR it sounds like we need to ensure we agree on a pattern for
abcxyz
.I'm leaving my code as camelCase for now, but part of closing this issue should ensure that abc-updater uses whatever we land on