Re: Parameter type widening RFC
| From: | Levi Morrison | Date: | Tue, 23 May 2017 22:50:09 +0000 |
| Subject: | Re: Parameter type widening RFC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99135@lists.php.net to get a copy of this message | ||
On Tue, May 23, 2017 at 1:25 PM, Rasmus Schultz <rasmus@mindplay.dk> wrote:
>
> I feel like this feature takes a pretty dangerous shortcut by simply
> removing a constraint check that we used to have - in favor of supporting a
> few rare cases, we removed a guarantee that interfaces and the
> implements-keyword has always provided.
>
> Those rare cases could have been supported in a safe manner by introducing
> a "mixed" or "any" type, which would have made the use of this feature
> explicit - which would have removed the risk of accidental omission of
> type-hints in the majority of cases.
>
This was my opinion at voting time which is why i voted against the RFC. It
passed 24 to 5 so it's just something we'll have to live with for now.