Kevin Hoffman
1 min readFeb 15, 2018

--

I like the idea of taking ownership of the aggregate. Part of the reason why I was thinking of not allowing for the mutable apply (with ownership/move) is that would invalidate the old aggregate. For example the code let a = b.apply(evt); would make b invalid. In some cases, like during reply, I might actually want to compare the aggregate before application (b) and the aggregate after application (a). This is another argument against frameworks, I suppose. In some cases I might never need this functionality, and so I could make the call to apply force a move.

Thanks for the suggestions!

--

--

Kevin Hoffman
Kevin Hoffman

Written by Kevin Hoffman

In relentless pursuit of elegant simplicity. Tinkerer, writer of tech, fantasy, and sci-fi. Converting napkin drawings into code for @CapitalOne

No responses yet