Re: Feature request and RFC
| From: | Thomas Gielfeldt | Date: | Tue, 24 Feb 2015 20:04:53 +0000 |
| Subject: | Re: Feature request and RFC | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83695@lists.php.net to get a copy of this message | ||
2015-02-24 20:49 GMT+01:00 Stanislav Malyshev <smalyshev@gmail.com>:
> Hi!
>
> > I've made PR proposing a feature request: A new interface Sortable.
> >
> > https://github.com/php/php-src/pull/1116
> >
> > If possible, I would like to create and RFC describing this in more
> detail,
> > and perhaps get a voting on.
>
> Can't you sort any class that provides ordered list of elements and
> Comparable or some kind of comparison callback by a generic algorithm?
> Interface with 11 functions, all similar but slightly different, seems
> unoptimal.
>
> One of the goals of this, is to make at it possible to use the Xsort()
functions on objects. I agree, implementing 11 methods might be
sub-optimal. We could reduce it to 2 methods, and then provide flags for
the variations.
--
> Stas Malyshev
> smalyshev@gmail.com
>