Re: [RFC] User Defined Operator Overloads

From: Date: Mon, 23 Aug 2021 14:23:10 +0000
Subject: Re: [RFC] User Defined Operator Overloads
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-115776@lists.php.net to get a copy of this message
On Mon, Aug 23, 2021 at 4:03 PM Pierre <pierre-php@processus.org> wrote: > > Anyway, I always thought that __set, __get __call and __invoke should > have been banned a long time ago. > Considering I use __invoke on a daily basis as it makes life so much easier when you have single method (service) classes, I'm going to disagree on this one. The other functions are also very useful tools to migrate legacy code. I agree that not being able to click through to operator overloading methods is annoying, untraceable __toString is the worst. I do think that this is something IDEs can handle, though not sure how reviewing will be when diffs still hide the implementation.

« previous php.internals (#115776) next »