Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 2019
Channel:KanDDDinsky · Length:50:49 · Published:2019-12-06 · Views:74199
Summary
Scott Wlaschin shows how statically typed functional languages, using F# examples, can model a business domain so that invalid states cannot be represented. The type system acts almost like an instant unit test at compile time.
Why HN recommends it
HN treats it as the canonical, approachable example of domain-driven design with types and 'make invalid states unrepresentable'.
this talk opened my eyes to the power of f# philosophy and type system — HN, 2020
Programming language design · Functional programming · Software architecture & design
Subtitles (excerpt)
[Music] thanks everyone for coming this is the main modeling made functional and hopefully you haven't seen this before otherwise you'll know the answer to all these questions but before we get started I just actually have a little challenge for you which is here's some code this is f-sharp code which is what I'll be using the code really doesn't matter but this is some sort of record type and there's these fields and there's an email address and there's this flag called is email verified which must be true if you have proved with the own email by clicking a link in an so if you saw this code in a code of you would you be happy with it or would you want to change it and if you would want to change it why would you want to change it's using primitive types good any other yeah the state is so it's hard to understand using a boolean to represent something much more complex and yeah so I mean I bit to be honest I probably would have been fine with this a few years ago but I've sort of evolved my thinking about this kind of design and I'm going to try and explain in this talk I'm going to try to explain why you know how I've evolved and why you might want to think about changing stuff so domain modeling made functional my name's Scott volution I have a twitter handle
On Hacker News
I wouldn't say its unloved or on a side track, it's baked into .net as a first class citizen and has dedicated engineers at Microsoft working on it. When I started I was pleasantly surprised how easy it was to download .net core on a mac and not do anything else to use F#. Its less popular than C# so its there's not as much documentation from 3rd party sources, youtube videos, etc, but you can us… — devmunchies, 2020-08
You can also search for "make invalid states impossible/unrepresentable" [0] to find more info on related practices. See "domain modeling made functional" [0] as a nice example [0] [LINK] [1] [VIDEO] — rapnie, 2026-02
I can recommend "Domain Modeling Made Functional" by Scott Wlaschin presented at KanDDDinsky 2019, that offers a very appealing example for making making invalid states unrepresentable. The example code is in F# but that is a perfect language to demonstrate the general idea. Best-practice I guess boils down to finding the right balance throughout the application design. [VIDEO] — rapnie, 2025-09
For anyone looking for a smaller introduction to this book, the author Scott Wlaschin has a talk with the same name: [VIDEO] It doesn't cover a lot of good topics in the book, but it might whet your appetite. — Huggernaut, 2021-02
Related videos
- TIMELAPSE OF THE FUTURE: A Journey to the End of Time (4K) · melodysheep · 29:21
- The past, present, and future of local-first - Martin Kleppmann (Local-First Conf) · Local-First Conf · 29:45
- Makepad: Designing modern UIs with Rust - Rik Arends - RustNL 2023 · RustNL · 55:19
- Who Destroyed Three Mile Island? - Nickolas Means | The Lead Developer Austin 2018 · LeadDev · 37:06
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- RailsConf 2014 - All the Little Things by Sandi Metz · Confreaks · 38:47
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- How To Design A Good API and Why it Matters · Google TechTalks · 1:00:19
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Overwatch Gameplay Architecture and Netcode · GDC Festival of Gaming · 1:04:03
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28