Please describe the feature you’d like to see added.
The developer notes say that class/function/method names in newly added code should be UpperCamelCase:
However, no recommendation is given for initialisms in class/function/method names. Searching DuckDuckGo for “camelcase” indicates a general consensus that the term “CamelCase” does not imply any particular policy here.
The existing codebase (unsurprisingly) is inconsistent here. For example, HtmlEscape
and JSONRPCRequest
both show up.
https://github.com/bitcoin/bitcoin/blob/e2174378aa8a339c7be8b4e91311513ed520a16d/src/qt/guiutil.h#L89 https://github.com/bitcoin/bitcoin/blob/e2174378aa8a339c7be8b4e91311513ed520a16d/src/wallet/rpc/util.h#L17
Is your feature related to a problem, if so please describe it.
When writing new code for Bitcoin Core, developers don’t know what style to use regarding initialisms. This produces unnecessary confusion, which is exacerbated when they grep the source code and find a mix of styles.
Describe the solution you’d like
It would be nice if the developer notes could be updated to clarify this. (I do not particularly care what the policy should be, I would just like some policy to be there, so that developers know what’s expected and the codebase can eventually converge toward a consistent style.)
Describe any alternatives you’ve considered
I guess the developer notes could be updated to instead say that there is no recommendation, and it’s up to whichever developer is submitting the PR. This seems undesirable, since it means the codebase will never gain a more consistent style.
Please leave any additional context
No response