Comparing Exceptions and Errors

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Jun 5 21:17:38 UTC 2022


On Sunday, 5 June 2022 at 21:08:11 UTC, Steven Schveighoffer 
wrote:
> Just FYI, this is a *different discussion* from whether Errors 
> should be recoverable.

Ok, but do you a difference between being recoverable anywhere 
and being recoverable at the exit-point of an execution unit like 
an Actor/Task?

> Whether specific conditions are considered an Error or an 
> Exception is something on which I have differing opinions than 
> the language.

Ok, like null-dereferencing and division-by-zero perhaps.

> However, I do NOT have a problem with having an 
> assert/invariant mechanism to help prove my program is correct.

Or rather the opposite, prove that a specific function is 
incorrect for a specific input configuration.

The question is, if a single function is incorrect for some 
specific input, why would you do anything more than disabling 
that function?




More information about the Digitalmars-d-learn mailing list