The solution to "Error handling"...
Meta
jared771 at gmail.com
Mon Jul 6 03:31:01 UTC 2026
On Sunday, 5 July 2026 at 23:36:59 UTC, Walter Bright wrote:
> Another term that describes his proposal is a "black hole
> object", which accepts all input but does nothing.
>
> The main thrust of his argument is eliminating the `if`
> statements that check for error states.
Ya... I don't agree with him at all on that. His approach to
reducing paths dedicated to error handling in his code is to
ignore those errors - which is what his "nil struct" solution
does. I don't think it's a good design at all. One thing that
WOULD genuinely help reduce errors is leveraging type system
invariants to make certain invalid states impossible - a great
language-level solution is not having null pointers - but he is
explicitly against that in this article.
More information about the Digitalmars-d
mailing list