Scott Wlaschin explains how to use statically typed functional programming to represent business domains and enforce business rules at compile time.
Explore DDD 2019 - Denver, Sept. 16-20
Statically typed functional programming languages encourage a very different way of thinking about types. The type system is your friend, not an annoyance, and can be used in many ways that might not be familiar to OO programmers.
Types can be used to represent the domain in a fine-grained, self-documenting way. And in many cases, types can even be used to encode business rules so that you literally cannot create incorrect code. You can then use the static type checking almost as an instant unit test — making sure that your code is correct at compile time.
In this talk, Scott looks at some of the ways you can use types as part of a domain-driven design process, with some simple real-world examples. No jargon, no maths, and no prior FP experience necessary.
About Scott Wlaschin
Scott Wlaschin is a developer, architect, and author. He is the author of the popular F# site fsharpforfunandprofit.com, and the book "Domain Modeling Made Functional", published by Pragmatic Bookshelf.
Known for his non-academic approach to functional programming, Scott is a popular speaker and has given talks at NDC, F# Exchange, DDD Europe, and other conferences around the world.
WEBSITE: exploreddd.com
TWITTER: twitter.com/ExploreDDD
Why it's here
2 people recommend this
What people say. Recommended for its excellent explanation of using types to make illegal states unrepresentable in domain-driven design.
e
u/eterpsin r/softwarearchitecture • Recommends
On “Is anyone using DDD?”
I initially thought that DDD was mostly about patterns & tools and that DDD was a good fit with OO languages.
Now I am convinced it is mostly about modeling domains and that it is a good fit with languages that support ADTs.
I came to that realization after reading: https://pragprog.com/book/swdddf/domain-modeling-made-functional
Also check out: link to this video
On “Compiling a Go program into a native binary for Nintendo Switch”
I think this talk gives some good examples of moving logic into types and making bad states unrepresentable. His examples are in F#, but none of these features are F# specific.
link to this video