title: Why the "begin/end" vs "first/last" discrepancy?
body: <p>Why do containers offer "<code>begin</code>"/"<code>end</code>" iterators while algorithms want "<code>first</code>"/"<code>last</code>" iterators?</p>
  
  <p>For example:</p>
  
  <ul>
  <li><p><code>vector</code> offers <code>.begin()</code> and <code>.end()</code> (<a href="http://en.cppreference.com/w/cpp/container/vector" rel="noreferrer">cppreference.com</a>, <a href="http://www.cplusplus.com/reference/vector/vector/" rel="noreferrer">cplusplus.com</a>).</p></li>
  <li><p><code>sort</code> wants parameters <code>first</code> and <code>last</code> (<a href="http://en.cppreference.com/w/cpp/algorithm/sort" rel="noreferrer">cppreference.com</a>, <a href="http://www.cplusplus.com/reference/algorithm/sort/" rel="noreferrer">cplusplus.com</a>).</p></li>
  </ul>
  
  <p><strong>Edit:</strong> Found an even bigger discrepancy. It's not just <em>algorithms</em> that use "<code>first</code>/<code>last</code>", it's also <strong>container constructors</strong> (like <a href="http://en.cppreference.com/w/cpp/container/vector/vector" rel="noreferrer"><code>vector(first, last, ...)</code></a>).</p>
  
  <p>I didn't check <em>all</em> containers and algorithms, but did check a few more and all containers offered <code>begin</code>/<code>end</code> and all algorithms wanted <code>first</code>/<code>last</code> (or variations like <code>first1</code> and <code>first2</code>).</p>
  
  <p>Is there a good reason for this? To me it would make more sense if they all used the same. Preferably <code>begin</code> and <code>end</code>, as I dislike <code>last</code> because that sounds inclusive but isn't. For algorithms it would simply mean the begin and end of the range to be processed, just like what first and last mean now.</p>