Re: Immutability RFC
| From: | Paul Jones | Date: | Wed, 16 Nov 2016 15:48:10 +0000 |
| Subject: | Re: Immutability RFC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96930@lists.php.net to get a copy of this message | ||
> On Nov 16, 2016, at 07:57, Silvio Marijić <marijic.silvio@gmail.com> wrote:
>
> Hi,
>
> To anyone who is interested in this RFC. What do you think what behavour we
> should have when you try to compare two immutable objects by identity like
> this:
I don't mean to be overly-nitpicky here, but it strikes me that the issue might not be
"immutable object" so much as "value object."
That is, an immutable object (or at least a read-only object) might very well have an identity. But
a *value* object, in addition to read-only or immutable, would have no identity proper.
Maybe using the alternative term (if it applies) would help to clarify the situation.
--
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