
Domain Modeling Made Functional
by Scott Wlaschin · first published 2018
74mentions
43recommended by
55HN commenters
2017–2026first – last mentioned
78% recommend22% neutral
Why HN recommends it
Walks through a small product start to finish, showing how types make invalid states unrepresentable and how domain-driven design works functionally. Uses F#, but the ideas carry over; suits non-F# readers too.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








If you haven't already, do also have a look at Scott Wlaschin's talk "Domain Modeling Made Functional with the F# Type System" (it seems he has a whole book out on it now too) https://fsharpforfunandprofit.com/ddd/ (F# and Elm are similar enough that the concepts map directly.) I've been challenging…
on “SVGs as Elm Code” ↗…it's very similar to mine and in domains I also think about. Your syntax is very convenient thanks for sharing. And finally, I assume you're familiar with Scott Wlashin (of F# for fun and profit & "Domain Modeling Made Functional")[1][2]. If not you 100% should read it as it is right up your alley. It's the intersection of Functional Programing and DDD/EIP. (I have no affiliation). [1] https://fsharpforfunandprofit.com/ddd/…
on “Ready for changes with Hexagonal Architecture” ↗…contrast with, say, PHP (crap language with wild success.) Or Prolog (a stately Elven language with deep but obscure success.) Haskell is what it is. In re: types and data, FP is good for that. See e.g. "Domain Modeling Made Functional" by Scott Wlaschin ( https://www.youtube.com/watch?v=Up7LcbGZFuo ) it's about F# but the concepts apply cross-language. In re: FP PLs "done right" I submit Elm lang. I've been using Elm recently and…
on “Haskell is a Bad Programming Language (2020)” ↗Speaking of domain-driven design, the author of this article wrote a great book called 'Domain Modeling Made Functional', which I heartily recommend (even if you don't have a specific interest in learning F#) https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
on “Introduction to the 'Why use F#' series (2012)” ↗Michael C. Feathers - Working Effectively with Legacy Code Scott Wlaschin - Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#
on “Ask HN: Best books on managing software complexity?” ↗Funny enough someone actually wrote a book on it. Data Modeling Made Functional https://www.amazon.com/Domain-Modeling-Made-Functional-Domai... It's one of the better and more useful software engineering books I've read. Even if you don't use a functional programming langauge. It's about using Algebraic Data Types do model common problems…
on “Algebraic Data Types in Haskell” ↗One of the things that made F# "click" for me was Wlaschin's "Domain Modeling Made Functional". It's largely a focus on how to think about the underlying data, and getting in that mindset helped tremendously in feeling more comfortable with F#.
on “Which programming paradigm had the most impact on you as an engineer and why?” ↗…would recommend two. F# in Action [1] by Isaac Abraham is a great (and recent) introduction to the F# language. For a more philosophical, domain-oriented book, you can't go wrong with Scott Wlaschin's Domain Modeling Made Functional book[2]. Scott's blog[3] is also must-read material. [1] https://www.manning.com/books/f-sharp-in-action [2] https://pragprog.com/titles/swdddf/domain-modeling-made-func... [3] https://fsharpforfunandprofit.com/
on “A new F# compiler feature: graph-based type-checking” ↗Domain Modeling Made Functional - Scott Wlaschin
on “Ask HN: Best books on managing software complexity?” ↗"Domain Modeling Made Functional" by Scott Wlaschin* Talk about a great book from cover to cover! Functional language evangelists are always ranting about types and their usefulness but fail to concretely convey how and why they can…
on “Ask HN: Fun Tech Book Recommendations?” ↗I recommend Domain Modeling Made Functional by Scott Wlaschin. It's analaysis first, DDD, then coding (in F#) Best intro to functional programming imo.
on “Rob Pike's Rules of Programming (1989)” ↗Not CT (IIRC) but see also "Domain Modeling Made Functional" - Scott Wlaschin https://www.youtube.com/watch?v=Up7LcbGZFuo
on “Generalizing 'jq' and Traversal Systems using optics and standard monads” ↗Take something like the design discipline Scott Wlaschin describes in this talk "Domain Modeling Made Functional"[1]. Combine it with a catalog of standard models like David Hay's "Data Model Patterns: A Metadata Map"[2] which is like a Pattern Language for data models combined with a catalog covering most (enterprise)…
on “One Way to Represent Things” ↗I've been learning F# and the docs are the best I've read. The Emlish book is great. https://zaid-ajaj.github.io/the-elmish-book/#/ Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# Book by Scott Wlaschin is amazing. His blog is also fantastic.https://fsharpforfunandprofit.com/ Get Programming with F# A guide for .NET…
on “Ask HN: Examples of good technical writing?” ↗5yrs ago I was roughly the same, depends how much you commit up front. I had minimal FP experience, so I bought "Domain Modeling Made Functional" [1] by Scott Wlaschin and used it for side projects / class libs first. Took about 6 months to experience the full mental shift. Even if you eventually decide you can't commit a team to F#, it's highly…
on “Scala isn't fun anymore” ↗