On 29/12/2020 10:28, Olle Härstedt wrote:
I just want to mention that immutability might be applied too
liberally in the current discourse, and in some cases, what you really
want is*non-aliasing*, that is, uniqueness, to solve problems related
to immutability. I think methods like `withX` is an anti-pattern, in
fact, and a symptom that you do not*really*  want immutability, but
rather uniqueness, at least in some cases.


Hi Olle,

I'm afraid I don't follow what you mean by "non-aliasing" and "uniqueness" here. Could you clarify, perhaps with some examples?

Cheers,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to