Array Lower Bounds
Jarrett Billingsley
kb3ctd2 at yahoo.com
Tue Dec 18 15:09:48 PST 2007
"Mike Marquard" <mike_marquard at hotmail.com> wrote in message
news:fk9hid$adm$1 at digitalmars.com...
> Why would there be a need for an extra memory in normall zero based
> arrays? I would think this would only affect people who decide to use the
> non-standard arrays to hold the lower bounds. And if bounds checking is
> turned off I would think it wouldn't make any difference. Then again I've
> never written a compiler so maybe I'm missing something.
You're right, this could be made to work by introducing another array type,
a "bounded array" with explicit lower and upper bounds. But the thing is
with that, and with the T[new] array type that Walter wants to introduce,
we'd have static arrays, dynamic arrays, bounded arrays, T[new] arrays, and
associative arrays :O That's an awfully large number of array types!
More information about the Digitalmars-d-learn
mailing list