Skip to content

Commit bfd910c

Browse files
committed
Merge bitcoin/bitcoin#18568: doc: Clarify developer notes about constant naming
05f9770 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 05f9770 practicalswift: ACK 05f9770 jarolrod: ACK 05f9770 🥃 Tree-SHA512: 766d0e25d9db818d45df4ad6386987014f2053584cbced4b755ceef8bda6b7e2cfeb34eb8516423bd03b140faaf577614d5e3be2799f7eed0eb439187ab85323
2 parents a000cb0 + 05f9770 commit bfd910c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/developer-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ code.
8888
separate words (snake_case).
8989
- Class member variables have a `m_` prefix.
9090
- Global variables have a `g_` prefix.
91-
- Compile-time constant names are all uppercase, and use `_` to separate words.
91+
- Constant names are all uppercase, and use `_` to separate words.
9292
- Class names, function names, and method names are UpperCamelCase
9393
(PascalCase). Do not prefix class names with `C`.
9494
- Test suite naming convention: The Boost test suite in file

0 commit comments

Comments
 (0)