Static arrays size limit, int
Nick Sabalausky
a at a.a
Thu Nov 19 05:50:16 PST 2009
"bearophile" <bearophileHUGS at lycos.com> wrote in message
news:he3hk8$6kg$1 at digitalmars.com...
> I'd like a higher max size limit for static arrays:
> uint[10_000_000] arr;
> For the LDC compiler is a fully arbitrary limit, it can support higher
> values. I'd like ldc to be free to use a higher limit.
>
>
> Most/all PC CPUs & operating systems are probably going to become 64 bit,
> but in D int values are 32 bit, so some years from now, when everything is
> 64 bit D programs will probably keep containing:
> int i;
> Unless D programmers will train themselves to nearly never use int and
> usually use:
> long i;
> that will be about as equally fast, but less probable to cause integral
> overflow.
> The choice of 32 bit as default int number in D may look bad few years
> from now.
> I don't see good solution. To me the best solution seems to use "long"
> everywhere in future programs fit for a 64 bit world (cent/ucent will be
> present, LLVM supports them already, so it's easy to add them to LDC).
>
> Bye,
> bearophile
Isn't that more or less what "size_t" is for?
More information about the Digitalmars-d
mailing list