![domain driven design functional programming domain driven design functional programming](https://10consulting.com/presentations/domain-driven-design-introduction/pictures/ddd-subdomain-complexity-flowchart.png)
In my previous iteration (not on code review), the Brazier class had an isLit: Boolean property.I don't think anything I've read says that the operator should, or must be closed over a single type, so maybe it's just something that I don't need to worry about. This though is Brazier + Command = Events. For instance, Int + Int = Int, Double + Double = Double, Money + Money = Money. When I think about other examples I've seen, they have been closed over the type that implemented the operator.
Domain driven design functional programming plus#
![domain driven design functional programming domain driven design functional programming](https://cdn.slidesharecdn.com/ss_thumbnails/functionaldomaindrivendesign-131201041802-phpapp02-thumbnail-4.jpg)
new state = old state + eventĪnother piece of wisdom I read from the DDD books (Domain-Driven Design, and Implementing Domain-Driven Design), is that Value Objects should probably be used more often than initially realized leaving Entities to be more focused as Value Object containers. This gave me one portion of reproducibility, returning to an exact state based on a sequence of Events. In this context, the state of the Aggregate is reconstituted from a sequence of Domain Events, each Event representing some change to the Aggregate. This led me into the world of DDD, and specifically, the concept of Aggregates + Event Sourcing (although that's not necessarily a DDD concept). I've been interested in making fully repeatable, reproducible game states.