Skip to content

Safety Hygiene

Explaining how to properly contain and document unsafe code to

really like Jack Wrenn's new article "The Three Basic Rules of Safety Hygiene," which covers how to handle unsafe code when you have to write it, through a hygiene checklist for expressing and validating compliance with safety conditions in the code.

Rust's goal is not to eliminate unsafe code, but to contain it in isolated modules you can audit and which provide safe interaces to external users. Sometimes unsafety is necessary, and having a process for how to handle that unsafety is a key development.

Research on how to reduce things like industrial accidents, medical incidents, and airplane crashes all consistently find that checklists and procedures work. Humans are fallible, and being accountable to a checklist or a process defends against our propensity to make mistakes.

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions