size_t for length on x64 will make app slower than on x86?

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 18 11:33:42 PST 2014


Marco Leise:

> foreach (i; 0 .. a.length)
> {
>     somework();
> }

Better:

foreach (immutable _; 0 .. a.length)
{
     somework();
}

Unfortunately this syntax is not yet supported, for unknown 
reasons:

foreach (; 0 .. a.length)
{
     somework();
}

Bye,
bearophile


More information about the Digitalmars-d mailing list