> An interesting debate emerged about the necessity of checking every possible error:<p>> In JS world this could be true, but for Rust (and statically typed compiled languages in general) this is actually not the case… GO pointers are the only exceptions to this. There are no nil check protection at compile level. But Rust, kotlin etc are solid.<p>Yes it actually is the case. You cannot check/validate for every error, not even in rust. I recommend getting over it.<p>For a stupid-simple example: You can't even check if disk is <i>going</i> to be full!<p>The disk <i>being</i> full is a real error you have to deal with, and it could happen at any line in your code through no fault of your own, and no it doesn't always happen at write() but can also when you allocate pages for writing (e.g. SIGSEGV). You cannot really do anything about this with code- aborting or unwinding will only ever annoy users, but you <i>can</i> do something.<p>We live in a multitasking world, so our users can deal with out-of-disk and out-of-memory errors by deleting files, adding more storage, closing other (lower priority) processes, paging/swapping, and so on. So you can wait: <i>maybe</i> alert the user/operator that there is trouble but then <i>wait</i> for the trouble to clear.<p>Also: Dynamic-wind is a useful general-purpose programming technique awkward to emulate, and I personally dislike subclassing BackTrack from Error because of what can only be a lack of imagination.