Bad array indexing is considered deadly

Moritz Maxeiner via Digitalmars-d digitalmars-d at puremagic.com
Wed May 31 13:45:32 PDT 2017


On Wednesday, 31 May 2017 at 20:09:16 UTC, Nick Sabalausky 
(Abscissa) wrote:
> [...]
>> program is in an undefined state and should terminate asap.
>
> Then out-of-bounds and assert failures should be Exception not 
> Error. Frankly, even out-of-memory, arguably. And then there's 
> null dereference... In other words, basically everything.

No, because as I stated in my other post, the runtime *cannot* 
assume that it is safe *in all cases*. If there is even one 
single case in which it is unsafe, it must abort.


More information about the Digitalmars-d mailing list