> 2. we have seeked in a file that was already closed.
> The second error, however, is much harder to catch. Most programming languages support the necessary features to make this error hard, typically by closing the file upon destruction or at the end of a higher-order function call, but the only non-academic language that I know of that can actually entirely prevent that error is Rust.
Why not simply add an `is_closed` flag and throw an error if it is?