Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every problem has its fitting programming paradigm, at least in the main paradigms: declarative, imperative, functional, object oriented.

DDD seems to be inevitably connected with OOP, at least I've never read something else.

Hyping one paradigm will lead to using this paradigm in an inappropriate way, sometimes or often.

(FYI: I didn't read the linked blog posting, because of medium.com)



That's funny, I always thought of DDD as a statically typed functional programming hhing.


Well, Evans and Vernons books use OOP. And when I was interested in the topic (actually it was event sourcing, which seems to be near 100% married to DDD, if you search online resources), I found only blog postings using OOP.

I found it funny, too, because IMHO event sourcing is fundamentally data driven, so FP would be a more natural fit.


He clearly says on the book that it's written using the tools that most people use, and that this is not a recommendation for the tools in any way.

He also gives a counterexample about implementing it in Prolog.


From experience I've found it easier in FP languages to get right, and have them stand a few years than standard OO without it being a maintenance headache having written a few of them. So yes - I figured the same thing.


DDD offers a lot of benefits regardless of the programming paradigm. We heavily use DDD in Haskell.


Can you provide some (online) resources on DDD + functional?


Scott Wlaschin wrote a good book on this topic “Domain modelling made functional” and you can find his talks and articles online. I think this is a decent introduction, https://techleadjournal.dev/episodes/79/


Thanks a lot!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: