Re: [RFC][Discussion] Harmo nise "untyped" and "typed" properties
| From: | Rowan Tommins | Date: | Fri, 17 Nov 2023 13:53:01 +0000 |
| Subject: | Re: [RFC][Discussion] Harmo nise "untyped" and "typed" properties | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121706@lists.php.net to get a copy of this message | ||
On 17 November 2023 13:30:42 GMT, Claude Pache <claude.pache@gmail.com> wrote:
>
>Yes, except that an untyped (respectively
mixed) property cannot
>be redeclared as mixed (resp. untyped) in a subclass. A small step
>in the right direction is to allow that.
Huh, I didn't know that. I'll add it to the RFC, at least to consider.
The RFC to add "mixed" gives an example of removing the type as invariance, but
doesn't seem to justify why "untyped" and "mixed" should be considered
different, from a type system point of view. https://wiki.php.net/rfc/mixed_type_v2
Regards,
--
Rowan Tommins
[IMSoP]