# Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 2019

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

[KanDDDinsky](https://www.youtube.com/@KanDDDinsky) · Published 2019-12-06 · 50:49 · B tier · Systems thinking

[Watch on YouTube](https://www.youtube.com/watch?v=2JB1_e5wZmU) · [All RatTube videos](/tube)

## Summary

Scott Wlaschin demonstrates functional domain modeling with F# examples. [Types](/lore/schemas-define-the-boundary) can express business choices in a form that people outside programming can review and correct.

The talk moves business rules out of undocumented flags and into explicit representations. Examples model optional data, constrained quantities, and a contact rule that requires at least one way to make contact. Constructors distinguish valid values from rejected input.

## Section notes

- [1:41](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=101s): The talk connects functional programming with domain-driven design.
- [9:31](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=571s): A missing choice in a type is understandable to a non-programmer reviewing the model.
- [18:18](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=1098s): Flags and undocumented atomic updates hide domain rules.
- [27:21](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=1641s): Optional values receive an explicit type representation.
- [36:33](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=2193s): A constructor checks the allowed range for an order-line quantity.
- [45:47](https://www.youtube.com/watch?v=2JB1_e5wZmU\&t=2747s): Making both contact fields optional fails to express the at-least-one rule.

## Key concepts

- [Types](/lore/schemas-define-the-boundary)

## Our take

Scott Wlaschin shows how to use types to model a domain so that some incorrect states cannot be written at all. It carries straight over to Effect Schema.

## Related videos

- [Stop agent slop with Effect |  Mattia Manzati | Effect Milan 2026 🇮🇹](/tube/stop-agent-slop-with-effect-mattia)
- ["Simple Made Easy" - Rich Hickey (2011)](/tube/simple-made-easy-rich-hickey-2011)
- [John Hughes - Testing the Hard Stuff and Staying Sane](/tube/testing-hard-stuff-john-hughes)
- [John Hughes - How to specify it! A guide to writing properties of pure functions | Code Mesh LDN 19](/tube/how-to-specify-pure-function-properties)

Summary based on the transcript. Written 2026-11-15.
