More on vectorized comparisons
Don Clugston
dac at nospam.com
Mon Aug 27 08:06:39 PDT 2012
On 24/08/12 15:57, bearophile wrote:
>> It's just syntax sugar for a very obscure operation,<
>
> It's an operation included in Cilk Plus, I think Intel devs know
> enough what they are doing.
> And I think code like this is a common need:
>
> if (a[] > 0) {
> // ...
> }
>> and it's somewhat ambiguous -- is it allowed to use short-circuit
>> evaluation?<
>
> That code means:
>
> foreach (i; 0 .. a.length) {
> if (a[i] > 0) {
> // ...
> }
> }
>
> Here I don't see problems caused by short circuit evaluation.
Wow. Then I misunderstood, and it's even less appropriate for D than I
thought.
vote -= int.max;
Worst syntax I've seen in a very long time.
More information about the Digitalmars-d
mailing list