01 — The language
Every case handled. Every bound checked. Every fn pure.
In Go
// an interface, a struct per case, a type switch// How an order is paid. enum Payment { Card { last4: String<min: 4, max: 4> } Invoice { days: Int<min: 0, max: 60> } }
// What the receipt says of a payment. fn describe(payment: Payment) -> String<max: 64> { match payment { Card { last4 } -> "Card ending {last4}" Invoice { days } -> "Invoice, due in {days} days" } }