Re: RFC: Comparable interface

From: Date: Thu, 30 Sep 2010 14:08:28 +0000
Subject: Re: RFC: Comparable interface
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-49809@lists.php.net to get a copy of this message
Hi Adam 2010/9/30 Adam Harvey <aharvey@php.net>: > All, > > I've just written an RFC (with a patch against trunk) to implement a > Comparable interface similar to that in Java — in effect, allowing > object instances to be compared with semantics defined in userspace. > This is admittedly at the lower end of RFC-worthy proposals, but it's > a good system, and I'd like to see it used a little more. Plus, it's > good practice for the more interesting stuff to come. :) > > The RFC is at http://wiki.php.net/rfc/comparable, and the patch > at > http://www.adamharvey.name/patches/comparable.diff.txt. Any and > all > feedback welcome, particularly since I'm still learning my way around > the innards of the Zend Engine, and it's entirely possible (indeed, > likely) that I've overlooked something obvious. I think its a great addition, but I think the interface should be defined within ZE like the other base interfaces that interact directly with the language syntax (like Iterator) and not in SPL. The patch itself is flowlessly simple and I think it would be a great addition for trunk, +1 -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#49809) next »