diff options
author | fanquake <fanquake@gmail.com> | 2021-06-30 09:22:57 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-06-30 09:23:15 +0800 |
commit | bfd910cae4e5f8ae9a6ec9dea02a9c28d023b8cb (patch) | |
tree | 60097db0e5d95d223f856648761521d9e67341b8 /CONTRIBUTING.md | |
parent | a000cb013cc1104ddcd6431d5a9b89e90bde2593 (diff) | |
parent | 05f9770c1fa64bd9730cd6e18ec333e0801c00d6 (diff) | |
download | bitcoin-bfd910cae4e5f8ae9a6ec9dea02a9c28d023b8cb.tar.xz |
Merge bitcoin/bitcoin#18568: doc: Clarify developer notes about constant naming
05f9770c1fa64bd9730cd6e18ec333e0801c00d6 doc: Clarify developer notes about constant naming (Russell Yanofsky)
Pull request description:
I'm pretty sure developer notes were intended to say constants should be upper case and variables should be lower case, but right now they are ambiguous about whether to write:
```c++
extern const int SYMBOL;
```
or:
```c++
extern const int g_symbol;
```
First convention above is better than the second convention because it tells you without having to look anything up that the value of `SYMBOL` won't change at runtime. Also I haven't seen other c++ projects using the second convention.
ACKs for top commit:
MarcoFalke:
cr ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6
practicalswift:
ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6
jarolrod:
ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6 🥃
Tree-SHA512: 766d0e25d9db818d45df4ad6386987014f2053584cbced4b755ceef8bda6b7e2cfeb34eb8516423bd03b140faaf577614d5e3be2799f7eed0eb439187ab85323
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions