Bad array indexing is considered deadly
Moritz Maxeiner via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 31 11:55:53 PDT 2017
On Wednesday, 31 May 2017 at 17:13:08 UTC, Nick Sabalausky
(Abscissa) wrote:
> 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.
To be fair, anything that can be handled in a sane&safe way
should inherit from Exception, not from Error, so throwing away
cleanup for Error makes sense, since an Error means the program
is in an undefined state and should terminate asap.
More information about the Digitalmars-d
mailing list