Smart slicing

renoX renosky at free.fr
Thu Mar 20 23:03:06 PDT 2008


BCS a écrit :
> Reply to bearophile,
> 
>> Trevor Parscal:
>>
>>> Allowing negetive indexes seems like a nice feature - but in fact
>>> acts to hide bugs in software, which is something that D makes
>>> efforts not to do.
>>>
>> In practice it rarely produces bugs, but note that my whole post was
>> not about negative indexes, it was about out-of-bound arrays
>> (positive) indexes.
>>
> 
> BTW: this "array[i%$];" does both.

Sure but it isn't the same semantic for the positive overflow as was 
exposed by bearophile: 'saturation' vs 'modulo' arithmetic.

Bye,
renoX

> 
>> Bye,
>> bearophile
> 
> 



More information about the Digitalmars-d mailing list