assert semantic change proposal

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 5 14:16:27 PDT 2014


On 8/4/2014 8:01 AM, Andrei Alexandrescu wrote:
> On 8/4/14, 7:27 AM, Matthias Bentrup wrote:
>> Should this semantics extend to array bounds checking, i.e. after the
>> statement
>>
>> foo[5] := 0;
>>
>> can the optimizer assume that foo.length >= 6 ?
>
> Yes, definitely. -- Andrei


Yes, after all, bounds checking is just another form of asserts.


More information about the Digitalmars-d mailing list