'int' is enough for 'length' to migrate code from x86 to x64
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 22 13:01:34 PST 2014
Am Fri, 21 Nov 2014 17:50:11 -0800
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
> I agree, though "foreach (i; length.iota.retro)" is no slouch either! --
> Andrei
Yes, no, well, it feels like too much science for a loop with
a decrementing index instead of an incrementing, no matter how
few parenthesis are used. It is not the place where I would
want to introduce functional programming to someone who never
saw D code before.
That said, I'd also be uncertain if compilers transparently
convert this to the equivalent of a reverse loop.
--
Marco
More information about the Digitalmars-d
mailing list