Is D still alive?

Peter Alexander peter.alexander.au at gmail.com
Sat Jan 29 03:58:30 PST 2011


On 27/01/11 6:14 PM, Jonathan M Davis wrote:
>> The safety net we are talking about is present only at the right bound of a
>> slicing syntax (it's not performed in normal array indexing), and it
>> consists in a single min(x, $) operation, that's one branch. So it slows
>> down code, but only a bit. And in many of such situations you probably
>> need to add a min(x, $) manually in the code anyway, so the overhead is
>> limited.
>
> Personally, I have _never_ needed to add a min call like that. So, while _you_
> may think that it's a common thing to do (and it may be that it is in your
> code), that doesn't mean that that's generally true.
>
> - Jonathan M Davis

I agree. I've never needed to add a bounds check like that.



More information about the Digitalmars-d mailing list