Re: Immutability RFC
| From: | Paul Jones | Date: | Sat, 19 Nov 2016 19:45:04 +0000 |
| Subject: | Re: Immutability RFC | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97076@lists.php.net to get a copy of this message | ||
> On Nov 19, 2016, at 13:22, Michał Brzuchalski <michal.brzuchalski@gmail.com> wrote:
>
> In Event Sourced application Aggregates and Entities are mutable but
> pushing Events for later write but speaking of ValueObject which ideally
> could be immutable classes there is must on immutability and AFAIK there is
> no need for identity for them.
Sure; a Value Object probably needs to be Immutable. But: an Immutable need not be a Value Object.
As such, it sounds to me like your concerns in this thread apply to Value Objects, not Immutables
per se.
--
Paul M. Jones
pmjones88@gmail.com
http://paul-m-jones.com
Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp
Solving the N+1 Problem in PHP
https://leanpub.com/sn1php