title: Naming: Why should named constants be all uppercase in C++/Java?
body: <p>I know, that for C++ and Java it is a well established naming convention, that constants should be written all uppercase, with underscores to separate words. Like this (Java-example):</p>
  
  <pre><code>public final static Color BACKGROUND_COLOR = Color.WHITE;
  public final static Color TEXT_COLOR = Color.BLACK;
  </code></pre>
  
  <p>This naming convention is easy to understand and to follow, but I ask myself, why choose this naming convention over the normal naming-convention for variables:</p>
  
  <pre><code>public final static Color backgroundColor = COLOR.WHITE;
  public final static Color textColor = COLOR.BLACK;
  </code></pre>
  
  <p>Theres seems to be no need to change the look of constants. If we want to assign a value to them, the compiler will prevent this anyways. Actually it makes problems, if later the constant will be changed into a proper variable (because the colors get configurable for instance).</p>
  
  <p>So what's the ultimate reason to write named constants all uppercase? Historical reasons?</p>