On Sun, 2010-10-03 at 15:21 +0100, Gustavo Lopes wrote:
> On Sun, 03 Oct 2010 15:16:05 +0100, Johannes Schlüter  
> <johan...@schlueters.de> wrote:
> 
> > On Thu, 2010-09-30 at 22:57 +0800, Adam Harvey wrote:
> >> > On Thu, 30 Sep 2010, Johannes Schlüter wrote:
> >> >> What is this "more interesting stuff to come"?
> >>
> >> Nothing that's likely to be ready before the forthcoming release
> >> cycle. I really did just want the RFC writing practice, since I
> >> haven't done one within PHP's structure before. :)
> >
> 
> I actually see no reason why we shouldn't expose the compare overload we  
> already have for internal classes to userspace classes.

For internal classes it is needed, as they extend zend_object with
custom information we don't find in hash tables etc. so without the
internal handler we can't decide whether two objects are equal or not.

> However, the patch goes much further than this and, even if that direction  
> were desired, it takes, in my opinion, the wrong options in the details  
> I've mentioned.

For userspace-defined classes the equal and other comparison operation
are clearly defined. (Well, maybe some of the conversions aren't always
that clear, but still follow rules)

When adding this feature the comparison operators change their
meaning ...

johannes
 


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to