title: What are Go arrays indexed by?
body: <p>I am some 'memory allocator' type code, by using an array and indexes rather than pointers. I'm hoping that the size of the index of the array is smaller than a pointer. I care because I am storing 'pointers' as integer indexes in an array rather than 64-bit pointers. </p>
  
  <p>I can't see anything in the Go spec that says what an array is indexed by. Obviously it's some kind of integer. Passing very large values makes the runtime complain that I can't pass negative numbers, so I'm guessing that it's somehow cast to a signed integer. So is it an <code>int32</code>? I'm guessing it's not an <code>int64</code> because I didn't touch the top bit (which would have been 2's compliment for a negative number).</p>