title: Why is size_t unsigned?
body: <p>Bjarne Stroustrup wrote in The C++ Programming Language:</p>
  
  <blockquote>
    <p>The unsigned integer types are ideal for uses that treat storage as a
    bit array. Using an unsigned instead of an int to gain one more bit to
    represent positive integers is almost never a good idea. Attempts to
    ensure that some values are positive by declaring variables unsigned
    will typically be defeated by the implicit conversion rules.</p>
  </blockquote>
  
  <p><strong>size_t</strong> seems to be unsigned "to gain one more bit to represent positive integers". So was this a mistake (or trade-off), and if so, should we minimize use of it in our own code?</p>
  
  <p>Another relevant article by Scott Meyers is <a href="http://www.aristeia.com/Papers/C++ReportColumns/sep95.pdf">here</a>. To summarize, he recommends not using unsigned in interfaces, regardless of whether the value is always positive or not. In other words, <strong>even if negative values make no sense, you shouldn't necessarily use unsigned.</strong></p>