The extent of trust in errors and error handling

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 6 12:56:02 PST 2017


On Mon, 06 Feb 2017 18:12:38 +0000, Caspar Kielwein wrote:
> I absolutely agree with Walter and Ali, that there are applications
> where on Error anything but termination of the process is unacceptable.

Sure, and it looks like you spend a ton of effort to make things work 
properly and to make things debuggable because your application has these 
requirements.

The position that D's runtime can make this decision for me is grating. 
Without the same kind of tooling that you're talking about available and 
shipped with dmd, it's absurd.

> I have definitely seen asserts violated because of buffer overflows in
> completely unrelated modules. Not sharing state unnecessarily, while
> certainly being good engineering practice is not enough.

Violated asserts catch this kind of problem after the fact. @safe prevents 
you from writing code with the problem in the first place.


More information about the Digitalmars-d mailing list