
Designing with types #03: Safety and Intent
In the previous installment of this series, we concluded that we can write code that is safe and that reveals intent by making illegal states unrepresentable and by encapsulating state changes. Today, we’ll try to come up with proper definitions of safety and revealing intent. Also, we’ll take a look at more examples of applying these principles in practice. ...