Wrapping Up
In this chapter, as we evolved the design in response to four requirements changes, we saw the benefits of type-driven domain modeling and the compositional approach to creating workflows from functions.
The type-driven design meant that when we added a new field to a domain type (such as adding VipStatus to ValidatedOrder), we immediately got compiler errors that forced us to specify where the data came from. That in turn guided us to modify other types and so on until all the compiler errors went away.
Similarly, when we changed one of the dependencies in the promotion code example (from GetProductPrice to the more complex GetPricingFunction), that also triggered a number of compiler errors. But after the code has been fixed up ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access