'int' is enough for 'length' to migrate code from x86 to x64
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 03:26:37 PST 2014
Daniel Murphy:
>> foreach_reverse(immutable i, 0...a.length)
>>
>
> I know you feel that way, but I'd rather face the non-existent
> risk of accidentally mutating the induction variable than write
> immutable every time.
It's not non-existent :-) (And the right default for a modern
language is to have immutable on default and mutable on request.
If D doesn't have this quality, better to add immutable every
damn time).
Bye,
bearophile
More information about the Digitalmars-d
mailing list