[OT] Swift removing minor features to piss me off

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 28 22:34:21 PDT 2016


On 29.04.2016 06:51, default0 wrote:
> for(int i = 0; i < 5; ++i)
>      arr1[i] += arr2[i];
>
> And
>
> for(int i = 0; i < 5; ++i)
>      arr[i].SetIndex(i);
>
> My guess, not knowing Swift, is that you will now implement these in a
> more verbose, harder to read way using while or use some concept similar
> to C#s LINQ or Ds ranges to somehow automatically apply this type of
> functionality.
> Both seem way more awkward than a normal for-loop.

I think it's fine with a D range: `foreach (i; iota(0, 5))` is less 
noisy than the `for` variant.


More information about the Digitalmars-d mailing list