Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109403 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91142 invoked from network); 28 Mar 2020 22:53:09 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 28 Mar 2020 22:53:09 -0000 To: internals@lists.php.net References: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> <7a83f950a31d94d5ff2307ac8219db3b7b6482b6.camel@schlueters.de> <12ad7c71-8958-7742-12c4-e83e359c8186@gmx.de> <3B71F74D-8142-48FB-9660-835B08D1DDDD@schlueters.de> <705aba69-8c17-f882-19fd-6f41a2c2ca25@gmx.de> <07f176a5c2ff0338cb67c9755bf37af6dcc2d465.camel@schlueters.de> Date: Sat, 28 Mar 2020 22:18:39 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 46.59.72.204 Subject: Re: [PHP-DEV] [VOTE] Userspace operator overloading From: ajf@ajf.me (Andrea Faulds) Message-ID: 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