title: Why does VecDeque's tail member point to the first element and not the last element?
body: <p>The <a href="https://github.com/rust-lang/rust/blob/1.44.0/src/liballoc/collections/vec_deque.rs#L54-L63" rel="nofollow noreferrer"><code>VecDeque</code></a> declaration:</p>
  
  <pre class="lang-rust prettyprint-override"><code>pub struct VecDeque&lt;T&gt; {
      // tail and head are pointers into the buffer. Tail always points
      // to the first element that could be read, Head always points
      // to where data should be written.
      // If tail == head the buffer is empty. The length of the ringbuffer
      // is defined as the distance between the two.
      tail: usize,
      head: usize,
      buf: RawVec&lt;T&gt;,
  }
  </code></pre>
  
  <p>Why does the comment say that <code>tail</code> points to the first element? I think it would be more natural that <code>head</code> and <code>tail</code> point to the first and last element, respectively.</p>
  
  <p>If there is any historical reason for this, I want to know it.</p>