Re: [RFC] Userspace operator overloading
| From: | Mark Randall | Date: | Sun, 16 Feb 2020 01:17:25 +0000 |
| Subject: | Re: [RFC] Userspace operator overloading | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108612@lists.php.net to get a copy of this message | ||
On 15/02/2020 22:05, jan.h.boehmer@gmx.de wrote:
Hi internals, What do you think about the RFC?"If an operator is used with an object that does not overload this operator, an NOTICE is triggered, which gives the user a hint about the method that has to be overloaded. For backward compatibility objects, which do not overload the operator, are converted to integer 1 (current behavior)." Noooo :( Notices are the enemy of all that is great and good. If operator overloading is going to become a first-class feature then it should be treated as such, and attempting overloading operators on objects that don't have the relevant method available should trigger an Error. -- Mark Randall marandall@php.net