Daily Shaarli

All links of one day in a single page.

Yesterday - July 2, 2025

Haralds Blog — Checked Exceptions are not Exceptional

There are 3 error or exception handling: unchecked exceptions (JS), Checked Exceptions (Go) or an integrated type (Result in Rust) that handle one case or the other.

Explicit is always better.
One thing with an integrated type, is the normal case and the other case. That's a great type to handle more than errors: a lookup of a key in a map, opening a file with a name for which there is no file is normal business. Maybe I will find more.

And for quality software, its function must be so blatantly obvious that everybody thinks: wow, this is trivial code, even a monkey could've programmed this.

Ciarán McNally : « This is important to remember, especially in hard… » - mastodon.ie

A 2 part graph

On the left is a branched tree where the branches represent "life paths" where only one path is highlighted in green (the path you took) from root to tip (this is the past)

The right of the graph represents your future and you are at the base of a new branched tree where every pathway is green, representing the choices you have going forward.