This arrangement, however (without adding dope vectors) means that having the location of item N is not enough to discover the index N itself; or the stride; or whether there are elements at N − 1 or N + 1.
Because many programming languages treat character strings as a kind of array, this leads directly to the infamous buffer overflow problem.
A dope vector reduces these problems by storing a small amount of metadata along with an array (or other object).
With dope vectors, a compiler can easily (and optionally) insert code that prevents accidentally writing beyond the end of an array or other object.
Getting to an element of the array costs a tiny bit more (commonly one instruction, which fetches the pointer to the actual data from out of the dope vector).