Re: [Concept] Extension methods
| From: | Alex Wells | Date: | Wed, 10 Aug 2022 22:12:43 +0000 |
| Subject: | Re: [Concept] Extension methods | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118405@lists.php.net to get a copy of this message | ||
> On 11 Aug 2022, at 00:30, Rowan Tommins <rowan.collins@gmail.com> wrote:
>
> a class implementing __call is assumed to reserve *all* method names.
This does make sense. Either an extension has precedence over class methods or it does not; having
extension methods in the middle of statically defined methods and __call would likely do more harm
than good.
> On 11 Aug 2022, at 00:30, Rowan Tommins <rowan.collins@gmail.com> wrote:
>
> I suppose a related question is whether __call itself could be implemented by an extension
> method. I would suggest no, to keep things simpler.
I agree. I can’t think of a magic method that should be allowed to be defined as an extension
method. None of them make sense.
> On 11 Aug 2022, at 00:30, Rowan Tommins <rowan.collins@gmail.com> wrote:
>
> (Aside: Reminder that convention on this list is to "bottom-post": quote the part of
> message you're replying to, then add your text below.)
Apologies. Still getting used to emails.