Taking F# to the stars is a series about the building blocks necessary to create a solution that reliably and safely achieves its purpose without ever faulting, and trust me, this is something your starship needs.
When venturing in the functional world, you will hopefully very quickly learn how to create pure code that never generates exceptions. I know, this sounds like fantasy coming from traditional object oriented development, but it’s very real.
While pure code is as close to perfection as humans will ever get, there are things you can’t possibly control, like human input for instance.
We need something to ensure that our domain is always valid, regardless of what users type in text boxes or whatever other impure content is sent its way, and the solution to this problem — in fact the only effective solution — is to create a domain with self-validating custom types instead of generic types such as strings.
So if we already know the solution, what’s the big deal? The problem is that this solution requires a lot more code, and nobody likes to write a lot more code to achieve similar results. This is where validation blocks come in.
For your convenience all 4 articles in this introductory series to validation blocks can be found below, in chronological order. If you only read one, just read the last one. If you only read two, read the first and last one. Whatever you read, I wish you a safe flight!