> How about you never write the wrong state in the first place ?
Indeed, and tagged unions (enums in Rust) explicitly allow you to avoid creating invalid state.
Indeed, and tagged unions (enums in Rust) explicitly allow you to avoid creating invalid state.
No comments yet.