Re: Immutability RFC

From: Date: Wed, 16 Nov 2016 16:57:15 +0000
Subject: Re: Immutability RFC
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-96932@lists.php.net to get a copy of this message
@Paul, I understand that immutable doesn't automatically apply value object. Can you give us some examples where immutable object should have identity? Cheers On Nov 16, 2016 4:48 PM, "Paul Jones" <pmjones88@gmail.com> wrote: > > > 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 > > > >

« previous php.internals (#96932) next »