Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83695 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48511 invoked from network); 24 Feb 2015 20:05:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 20:05:18 -0000 Authentication-Results: pb1.pair.com header.from=thomas@gielfeldt.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=thomas@gielfeldt.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gielfeldt.dk from 209.85.217.181 cause and error) X-PHP-List-Original-Sender: thomas@gielfeldt.dk X-Host-Fingerprint: 209.85.217.181 mail-lb0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:41266] helo=mail-lb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/94-24698-C79DCE45 for ; Tue, 24 Feb 2015 15:05:17 -0500 Received: by lbiz11 with SMTP id z11so27442983lbi.8 for ; Tue, 24 Feb 2015 12:05:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=kbCfX3T2AxeMAzXTAv3FL+lCvw61J2SVjRbw4DNHszc=; b=mDPABkR48PtKYa2WC3hFtL8lLnCl6phAXXK12wmuUzx2BWepyJ1yjz5pxirg/oRMFM YUnBiaeVH38ucFVue+jr9PP9MWW17niXK6lsuIvlk3CzgnDbWhNtS+jXR2t6LdxsTulC F7fLJvClUjkHvhGptul0SJ1SkJ+a7Q0kaYjgMy5O3ApHOvvGgQz9G/J3M7Nvk/TpY4gg 0mBWdZ4fwTUoYqg38vPNZ9G2dGw7EWkH9ZoaRbuUggdihoHaFBCAmd+3prQarjd6iI9W zHB/RyDr+6lkFcC1eQVDdh2LhUpecjNQbZEtgeT3MMRd0nYwQUmweUQ91s4uEn1UX26X qT7A== X-Gm-Message-State: ALoCoQlW9PxHtAis1vI3+SR9JLt8kQWUKOC87J5OW0rbKbIhB77jFbqZaDutiTK5V+5l55tcGov3 X-Received: by 10.152.26.199 with SMTP id n7mr15631731lag.29.1424808314033; Tue, 24 Feb 2015 12:05:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.144.194 with HTTP; Tue, 24 Feb 2015 12:04:53 -0800 (PST) In-Reply-To: <54ECD5B1.7070202@gmail.com> References: <54ECD5B1.7070202@gmail.com> Date: Tue, 24 Feb 2015 21:04:53 +0100 Message-ID: To: Stanislav Malyshev Cc: internals Content-Type: multipart/alternative; boundary=089e0160a4066e6e5a050fdb094d Subject: Re: [PHP-DEV] Feature request and RFC From: thomas@gielfeldt.dk (Thomas Gielfeldt) --089e0160a4066e6e5a050fdb094d Content-Type: text/plain; charset=UTF-8 2015-02-24 20:49 GMT+01:00 Stanislav Malyshev : > 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 > --089e0160a4066e6e5a050fdb094d--