Re: Custom object equality

From: Date: Wed, 18 Oct 2023 17:13:42 +0000
Subject: Re: Custom object equality
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-121412@lists.php.net to get a copy of this message
On Wed, Oct 18, 2023 at 7:05 PM Christian Schneider <cschneid@cschneid.com> wrote: > > Am 18.10.2023 um 18:42 schrieb Larry Garfield <larry@garfieldtech.com>: > > So the real question is: Would anyone who voted No on operator overloading before vote Yes > > on it if it used ~=, ~>, ~+, etc. instead? > > I confess that I'm not a fan of operator overloading for a language like PHP but > introducing new operators on top of making them overloadable seems a bad idea. Operators have the > problem of being hard to look up and prefixing them with ~ feels like the worst of both worlds. > > Regards, > - Chris > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > I suspect xdebug would work fine if you can't use the IDE to ctrl-click on the operator. I highly suspect you'd never even use them except in specific cases where it would feel natural to do so (such as the money example, a units library, a matrix mathematics library, or a real number field library). Robert Landers Software Engineer Utrecht NL

« previous php.internals (#121412) next »