Bad array indexing is considered deadly

Nick Sabalausky (Abscissa) via Digitalmars-d digitalmars-d at puremagic.com
Wed May 31 10:13:08 PDT 2017


On 05/31/2017 09:04 AM, Steven Schveighoffer wrote:
> 
> What are your thoughts?

+1 million. I *hate* D's notion of Error. Well, no...more correctly, I 
absolutely hate that it throws cleanup/unwinding straight out the window 
for many situations that can obviously be handled safely without the 
paranoid "ZOMG Sky Is Falling!!!!" overreaction that is baked into the 
design of Error. And that causes problems like the one you describe.

Kill it with fire!!!

A wrapper type seems like a plausable workaround, but I really, really 
dislike that it would ever be necessary to bother wrapping such a basic 
prevailant feature as...arrays, especially just to work around such a 
collosal misfeature.

And, as you describe in your reply to H.S. Teoh, the current behavior of 
Error can actually cause MORE damage than just rcovering from an 
obviously recoverable situation.


More information about the Digitalmars-d mailing list