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

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

Reply via email to