Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58509 invoked from network); 4 Mar 2015 10:07:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2015 10:07:43 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:55237] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/50-56703-F69D6F45 for ; Wed, 04 Mar 2015 05:07:43 -0500 Received: (qmail 30425 invoked by uid 89); 4 Mar 2015 10:07:39 -0000 Received: by simscan 1.3.1 ppid: 30419, pid: 30422, t: 0.0781s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 4 Mar 2015 10:07:39 -0000 Message-ID: <54F6D96B.7000900@lsces.co.uk> Date: Wed, 04 Mar 2015 10:07:39 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54F440E6.4050908@gmail.com> <54F48108.6010000@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Feature request and RFC From: lester@lsces.co.uk (Lester Caine) On 04/03/15 09:41, Rowan Collins wrote: > Hm, yes, I hadn't thought of the use case of sorting external data. Perhaps we actually need to specify both interfaces (yes, I realise I'm just inventing more work here, sorry!) - one for the use case of a custom data structure that wants to worry about the sort mechanics but not the ordering, and one for the different use case of wanting to sort something other than PHP values. I strongly believe that making the first type of object reimplement 11 types of comparison callback which the engine already has is a bad idea. I'd been following this thread, but only from a distant need. I tend to be working with lists pulled directly from a database, and Firebird allows the selection of collation rules to take care of the bulk of the problems this interface is also trying to address. This option allows all of the complication created by unicode to be addressed and a ready sorted array is provided. The starting point for a generic approach needs to be based on a unicode rule set which currently we do not have a standard for. ICU provides a collation system in parallel with the database standards and if the ICU based string object is adopted then sort interfaces need to be based on that. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk