Re: [VOTE] Userspace operator overloading
| From: | Andrea Faulds | Date: | Sat, 28 Mar 2020 21:18:39 +0000 |
| Subject: | Re: [VOTE] Userspace operator overloading | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109403@lists.php.net to get a copy of this message | ||
Hi everyone,
Johannes Schlüter wrote:
If we use two methods as well it is a saner design. I won't like it, but lot better than the current one.Just want to +1 this. Two methods, neither of which are static, seems like a cleaner approach to me. I maybe like this better than my suggested boolean argument (it certainly looks nicer). Consider what happens in the current proposal if a class, intentionally or otherwise, only supports being on one side of an operator… it will produce the same error message as if it didn't support the overload at all :( Thanks, Andrea