title: Const before or const after?
body: <p>To start you probably know that <code>const</code> can be used to make either an object's data or a pointer not modifiable or both.</p>
  <pre class="lang-cpp prettyprint-override"><code>const Object* obj; // can't change data
  Object* const obj; // can't change pointer
  const Object* const obj; // can't change data or pointer
  </code></pre>
  <p>However you can also use the syntax:</p>
  <pre class="lang-cpp prettyprint-override"><code>Object const *obj; // same as const Object* obj;
  </code></pre>
  <p>The only thing that seems to matter is which side of the asterisk you put the <code>const</code> keyword.  Personally I prefer to put <code>const</code> on the left of the type to specify it's data is not modifiable as I find it reads better in my left-to-right mindset but which syntax came first?</p>
  <p>More importantly why is there two correct ways of specifying <code>const</code> data and in what situation would you prefer or need one over the other if any?</p>
  <p>Edit:</p>
  <p>So it sounds like this was an arbitrary decision when the standard for how compilers should interpret things was drafted long before I was born.  Since <code>const</code> is applied to what is to the left of the keyword (by default?) I guess they figured there was no harm in adding <em>&quot;shortcuts&quot;</em> to apply keywords and type qualifiers in other ways at least until such a time as the declaration changes by parsing a * or &amp; ...</p>
  <p>This was the case in C as well then I'm assuming?</p>