The previous chapters indirectly acquainted us with arrays, associative arrays, and strings—an expression here, a literal there—so it’s time for a closer inspection. A lot of good code can be written using only these three types, so learning about them comes in handy now that we have expressions and statements under our belt.
D offers a simple but very versatile array abstraction. For a type
T is the type of contiguous regions of memory containing elements of type
T. D calls
T “array of values of type
T” or, colloquially, “array of
int array =