Re: [RFC][Discussion] Consistent callables
| From: | Rowan Collins | Date: | Mon, 29 May 2017 11:01:40 +0000 |
| Subject: | Re: [RFC][Discussion] Consistent callables | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99228@lists.php.net to get a copy of this message | ||
On 28 May 2017 22:23:30 BST, Dan Ackroyd <danack@basereality.com> wrote:
>Hi,
>
>I'd like to introduce an RFC to cleanup the behaviour of callables and
>related functions in PHP.
>
>https://wiki.php.net/rfc/consistent_callables
Hi Dan,
I like the principle behind this RFC, so thanks for tackling it. A few comments came to mind from a
first read through:
In your strict definition of a callable, you mention "a string at index 0 which is a valid
class name"; this should probably say "a fully qualified class name", i.e. Foo::
class not 'Foo'. This would fit with your proposal to remove support for 'self'
and 'static', as the meaning of 'Foo' depends on the current namespace and
aliases.
Regarding is_callable, I appreciate you want to keep the parameter list short, but I think replacing
an existing parameter without any version where it's removed completely could lead to some very
confusing bugs. IMO, when BC breaks are necessary, they should be big and obvious so people spot and
fix them.
Finally, I notice you target a few deprecations at "7.last"; the problem with that is that
we might not know when we release that version that it will be the last. It wasn't decided
until nearly a year after 5.6 was released that there wouldn't be a 5.7, and the idea of
creating a 5.7 containing only deprecations was ruled out. Suggestions to plot a roadmap of future
releases have so far but gained traction, so it's likely that 8.0 will be a similar scenario.
Regards,
--
Rowan Collins
[IMSoP]