Domain Driven Design in Functional Programming?
Is there an equiv开发者_Go百科alent of DDD in FP? It seems to me that DDD is only valid in OOP paradigm.
It depends how seriously you preach the DDD gospel:
If you buy into all the details of Erik Evans's book, especially the stuff in Part II that is heavily object-oriented, than no sane person would try to duplicate that in a functional language.
If your interest is primarily in Part I of the book, that everyone on the project should have in common a language in the domain, then the leaders in the functional-programming movement have been in the area of embedded domain-specific languages. These are common currency now, but a paper by Erik Meijer and Daan Leijen at DSL'99 did a great deal to make these techniques popular. Constructing an embedded DSL is now a very popular technique in functional programming, and if you search for embedded domain specific Haskell you will find many examples.
So my answer is: the important, foundational ideas of Domain-Driven Design can be applied in a functional setting, but many of the object-oriented details are irrelevant.
Domain Specific Languages. See for example this book.
DDD eXchange 2012: Greg Young on Functional Programming with DDD
http://skillsmatter.com/podcast/design-architecture/ddd-functional-programming
精彩评论