Re: [RFC Discussion] Typed Properties
| From: | Fleshgrinder | Date: | Sat, 19 Mar 2016 12:31:51 +0000 |
| Subject: | Re: [RFC Discussion] Typed Properties | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91776@lists.php.net to get a copy of this message | ||
On 3/19/2016 1:29 PM, Lester Caine wrote:
> On 19/03/16 12:17, Fleshgrinder wrote:
>> You are mixing to things like I did. If you never unset and never assign
>> then the value of the property is *null* or as I defined to avoid
>> confusion *void*. All fine. The question was, should this result in an
>> error and the general consensus here is /no/.
>
> My point is that $object->property = null; after the object has been
> 'constructed' is still a valid assignment ... the object's content may
> well be changed by changing the loaded object id.
>
I am not so sure about that and one could always reside to not using
type hints in such situations. Additionally I do not think that one
should change the /loaded object id/ better create a completely new
instance. But I might be missing more context here.
--
Richard "Fleshgrinder" Fussenegger
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc