aboutsummaryrefslogtreecommitdiff
path: root/doc/developer-notes.md
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-04-08 15:08:35 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-04-08 15:08:35 -0400
commit05f9770c1fa64bd9730cd6e18ec333e0801c00d6 (patch)
tree9dde78ebb5420c03b90cf297979576ce674245ed /doc/developer-notes.md
parentb3c3d9a518f8cc51c0b73c5e4ee6bd567be441d2 (diff)
downloadbitcoin-05f9770c1fa64bd9730cd6e18ec333e0801c00d6.tar.xz
doc: Clarify developer notes about constant naming
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++ // foo.h extern const int SYMBOL; // foo.cpp const int SYMBOL = 1; ``` or: ```c++ // foo.h extern const int g_symbol; // foo.cpp const int g_symbol = 1; ``` First convention above is better than the second convention because it tells you without having to look anything up that the value of `SYMBOL` will never change at runtime. Also I've never seen any c++ project anywhere using the second convention
Diffstat (limited to 'doc/developer-notes.md')
-rw-r--r--doc/developer-notes.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index da07080724..97659cf76a 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -83,7 +83,7 @@ code.
separate words (snake_case).
- Class member variables have a `m_` prefix.
- Global variables have a `g_` prefix.
- - Compile-time constant names are all uppercase, and use `_` to separate words.
+ - Constant names are all uppercase, and use `_` to separate words.
- Class names, function names, and method names are UpperCamelCase
(PascalCase). Do not prefix class names with `C`.
- Test suite naming convention: The Boost test suite in file