Hacker News Comments on
Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#
·
6
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.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 in the day-to-day business domain (not typical academic problems).
It's a really simple and awesome presentation, and by the end you're dying for the ability to use this more so in the day to day job. Honestly after reading through it, trying to model problems in OOP just seems so unnecessarily obtuse.
The Scott Wlaschin also runs https://fsharpforfunandprofit.com
https://fsharpforfunandprofit.com/ddd/ - a link to a talk on it which is decent, but the book is much better.
⬐ xwowsersxThanks. I was asking specifically about accomplishing this in Python.
So, this is going to be an uphill battle for you. I suggest you actually learn Haskell first, and then you'll be able to apply its lessons to TypeScript.Its tricky because these are patterns that are familiar in Haskell but are not really taught in other settings.
Additionally, to really learn these, you need to experiment with them. Use them. etc. That's pretty hard to do if the learning resources are mostly in haskell and you don't really understand it.
Alternatively, this might help: https://github.com/MostlyAdequate/mostly-adequate-guide
Also alternatively, what I would do is just go slowly through the fp-ts code. Look at it a piece at a time and slowly grow your understanding.
This may also help https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
I haven't, is this the one? https://www.amazon.co.uk/Domain-Modeling-Made-Functional-Dom...
⬐ xupybdThat is the one. It's also an introduction to structuring an F# application so it might not be for everyone but it's an easy read.Also I'd recommend getting it from here. https://pragprog.com/titles/swdddf/domain-modeling-made-func...
Just because I personally like the pragprog site.
⬐ stepbeekI’ll give it a shot - I’ve done some FP so I’m not put off by F#.Thanks!
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...
⬐ hurrilAn excellent book and one that I used together with Stylish F# and F# Deep Dives to get my current job. Been writing F# full time now for over a year and I must say that it's nothing short of a brilliant language.Came here from 10 years of Scala with no .NET experience what so ever.
Just overall one of the nicest experiences so far. 9/10, would recommend!
⬐ ZolomonWhat kind of problems do you solve in your line of work? At what scale, is it performance critical? I love F#, but around six-eight years ago it was not a good fit for solutions to soft real-time problems.⬐ sunshineragif I might ask, where do you work? and/or in what domain?⬐ hurril⬐ candlWork at a large:ish private bank i Sweden basically doing "digitization" of all customer processes.I have been debating whether to learn Scala or F# in my spare time. F# seems to be the more pragmatic choice. Doesn't go the insane way of FP that Scala does with complicated libraries or convoluted inheritance hierarchies. The Scala community seems more divided than the F# one with multiple competing ecosystems/libraries for achieving the same thing. My interest lies in webdev/backend and F# seems to be an obvious choice with asp.net and it's supplanting libraries. Not sure how Scala fares, but i guess it's not the primary use case for it. On the surface I kind of like the syntax of Scala, it's very familiar but I fear that I would get more frustrated the deeper I would dig because eventually you have to integrate other people's code and the way most of it is written looks to be like haskell in disguise. Not really sure about the pros/cons.⬐ jmfldnVeteran Scala dev here. I'm not here to convince you to choose it over F# but I can tell you that it's a beautiful language. Scala is used heavily for backend web dev, in fact, it's all I use it for.Don't worry about advanced concepts, you'll get to those when / if you need them. They have their uses but it depends on what you're working on. I think many people just succumb to the blub paradox too quickly with these sorts of languages. It's a real shame.
It's honestly overstated how hard it is. I started as a junior dev with Scala and was highly productive within months. I don't think there's anything special about me. I was highly motivated by my love for the language I guess.
⬐ JackMorganI've used Scala, Clojure, Haskell, and F#. I'd say F# does a great job of providing a happy middle path between the strict side effect management of Haskell and the advanced OOP features of Scala. It also brings the well-designed ASPNET CORE stack.If I was starting from scratch and just wanted to learn, I'd say you'll learn plenty from any of them. Haskell has the most to teach about purity in FP, Scala the most about OOP, and Clojure the most about metaprogramming.
F# has the most to offer for just getting things done quickly. It is a language of practical compromises. It's not the most pure, it doesn't bring the most advanced OOP, and it's metaprogramming is tricky. However F# is what I grab first when I want to build production software quickly and safely.
I like your approach to problem solving - 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/
[2] https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
[3] https://fsharpforfunandprofit.com/rop/ (Railway oriented programming)
⬐ CommunitivityThanks, for the compliment and for the links. I wasn't aware of him until now. I've little experience with the X# family, other than some Mono hacking on an OpenSim clone. Sounds interesting and will definitely read at least the Domain Modeling one, possibly the F#s too (never too late to add a piece of kit to your toolbox).
So I didn't include it in the original link, but he has a book he wrote under the same title (Domain Modeling Made Functional). I've been going through it now. It's a much more in-depth treatment of the same topics. He walks through a small product from start to finish.Additionally he does a really great job of walking through two things that I don't think are covered well enough at all for beginning and intermediate programmers (and even experienced ones like myself may have missed parts of along the way).
1. How to effectively gather customer requirements, what questions to ask, what things to dig into, how to organize them. A simple walk through, better than the hand-wavy stuff most people do when requirements gathering.
2. How to model a domain / problem space before implementing. How to effectively reason about your entities, services and actions. And iterate on these with your customer before coding.
I seriously wish I had run across this when I first started coding. A really great collection of tangible, actionable advice.
I've never done it in javascript so won't try to guess, but the first two parts of the three part book are really applicable regardless of the language. Will have to finish the third to see how it is.
Domain Modeling Made Functional - Scott Wlaschin
(I have zero affiliation with the author and get nothing from any links)https://pragprog.com/book/swdddf/domain-modeling-made-functional https://www.amazon.com/Domain-Modeling-Made-Functional-Domain-Driven/dp/1680502549
His blog https://fsharpforfunandprofit.com/
⬐ mettamageThanks! I bought the book.