Re: Re: Minor engine patch to facilitate PECL/operator

From: Date: Fri, 17 Feb 2006 11:09:26 +0000
Subject: Re: Re: Minor engine patch to facilitate PECL/operator
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
At 11:55 17/02/2006, Stefan Walk wrote:
On 16/02/06, Zeev Suraski <[email protected]> wrote: In languages where operator overloading is supported, it comes hand in hand with strict typing, which wouldn't allow for different values for x>y and y<x... Zeev That's not true, Ruby for example has operator overloading, and has no problems with different meanings of x>y and y<x (but i don't know a core class that does that).
I mean *real* languages :) Seriously though, it sounds like a bad idea to allow it.
Also, PHP already breaks the transitivity rule for the equality operator ($a == $b and $b == $c does not imply $a == $c), so there's not much new evil if a user can, by loading an extension, break the symmetry of the comparison operators, IMO.
Oh I disagree. While we do have some unique cases in which transitivity is not maintained, they are quite, well, unique, and arguably make sense. More importantly, the discussion here is not about transitivity (although it does have transitivity implications). It's more fundamental, it's about the very meaning of smaller-than / greater-than and the relationship between them. Zeev

Thread (19 messages)

« previous php.internals (#21900) next »