Making illegal states unrepresentable๐ Part 5of Type-Driven Design with Swifttype safetysoftware design๐บ videoOct 29, 2024 ๏น โ๏ธ 12 min readIn state modeling, perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. "Making illegal states unrepresentable" is a very powerful approach to data modelling and software design in general.
Typestate - the new Design Pattern in Swift 5.9type safetysoftware design๐บ videoDec 15, 2023 ๏น โ๏ธโ๏ธ 16 min readIn this article I will introduce you to Typestate pattern, popularised by Rust language, now available in Swift 5.9. You will see how the combination of generic constraints and Swift's new memory ownership model allows you to write bulletproof code.