A Philosophy of Software Design
Basile B.
b2.temp at gmx.com
Tue May 26 11:21:06 UTC 2026
On Sunday, 24 May 2026 at 04:10:31 UTC, Walter Bright wrote:
> Thanks. This is an interesting general purpose method.
>
> But the book suggests a different approach in the title -
> define them out of existence. I've also thought of various
> general replacement schemes for exceptions.
>
> The difficulty with exceptions is they are complicated. It's
> difficult to figure out what path the code execution goes
> through when there are various exceptions. The exception paths
> are also a rich source of bugs because they are untested and
> may never trigger.
>
> Some examples of defining them out of existence:
>
> [...]
>
> 3. Invalid code nodes are replaced with "Error" nodes. This
> worked far better than I anticipated. No exceptions are thrown.
> It also behaves like NaN.
Bollocks. Here you are mistalind software errors with how a
compiler must handle wrong input. This third example is not a
good one.
More information about the Digitalmars-d
mailing list