In state modeling, perfection is achieved not when there is nothing more to add, but when there is nothing left to take away.| Swiftology
In this article we'll talk about **Software Design** and the role **types** play in this process. You'll learn how to leverage Swift's expressive type system to create accurate and robust models tailored to solve problems in your domain.| Swiftology
A common challenge in software design is ensuring that access to a certain functionality is restricted under specific preconditions. In this article, I will show you how to design bulletproof type-safe access control using the **Witness Pattern**.| Swiftology
Validation is a very common task in software engineering. We need to validate stuff all the time: user inputs, data formats, array bounds, external configurations, etc. In this article I will show you how to perform validation in a type-safe way, eliminating a whole class of bugs.| Swiftology
With this series of articles, I have a lofty goal of shifting your Swift programming mindset. I know it sounds presumptuous, but this is exactly what happened to me a few years back when I was introduced to Type-Driven Design. I assure you, it’s not some new fad or an esoteric methodology. It’s a system of practical, well-researched, and time-tested ideas that form the basis for a powerful approach to writing high-quality, robust, and correct software.| Swiftology
In this article I will show you how to achieve a strong compile-time guarantee that your code is correct. I will demonstrate how the internal structure of your types can hold unbreakable rules within them, known as invariants. Through real-world examples such as `NonEmptyArray`, `Zipper`, and `UUID`, I'll try to convince you to view the structure of your types through the lens of type safety, ultimately levelling up your Swift programming skills.| Swiftology
In 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.| Swiftology