On Sat, 21 Apr 2012 18:25:44 -0400, Ali Çehreli <acehr...@yahoo.com> wrote:
In D, arrays are what they should have been in C :). A pointer and a
size. Something the equivalent of the following (for the int type):
struct int_Array
{
int * elements;
size_t number_of_elements;
}
Technically speaking, the number of elements comes first in the memory
layout. The fact that even seasoned D coders get it wrong (in fact, I had
to look it up in druntime to be sure!) is a testament to how
well-encapsulated D slices actually are.
-Steve