Re: [RFC] [VOTE] Typed properties v2
| From: | Rowan Collins | Date: | Sun, 23 Sep 2018 21:00:40 +0000 |
| Subject: | Re: [RFC] [VOTE] Typed properties v2 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103243@lists.php.net to get a copy of this message | ||
On 23/09/2018 21:50, Christoph M. Becker wrote:
In my opinion, explicitly *declared* properties should not be unsettable. We don't allow to undefine constants, functions, classes etc. either. Adding and removing other properties could still be allowed.While I agree, I think that's a somewhat separate discussion: right now, you can unset() a declared property, and that is handled differently from setting it to null. Weird though it is, there is widely-used code which actively relies on this fact, so it's not something we can just "fix". The solution might be some way of marking a class as "completely specified" - no dynamic properties may be added, no declared properties may be unset; but like I say, that's a separate discussion. Regards, -- Rowan Collins [IMSoP]