[kdepim-users] Sort Order in KDE-PIM

Ingo Klöcker kloecker at kde.org
Mon Mar 22 20:33:13 GMT 2010


On Monday 22 March 2010, Bob Smits wrote:
> On March 21, 2010 04:53:48 am Ingo Klöcker wrote:
> > On Saturday 20 March 2010, Bob Smits wrote:
> > > Unfortunately the sort order in KDEPIM is set to that silly one
> > > where, for example, in a list of contacts, CUPE 2000 comes before
> > > CUPE 222.
> > 
> > This isn't a silly sort order. It's the simple lexicographical sort
> > order. Brad wrote how to get what you want.
> 
> I understand that it's the simple lexographic sort, Ingo.
> 
> It has ALWAYS seemed like a silly sort order because many
> organizations have numbers incorporated as part of the name - union
> locals, for example. It has always, and still does, seem silly to me
> to put CUPE 606 after CUPE 2000 in the sort order. I understand why
> it does it, but I've never understood why we would choose to use
> that kind of sort.

Well, there are two reasons I can think of:

1.) Lexicographical sorting is trivial. One simply compares one 
character after another. Natural sorting is hard because one has to 
interpret the texts one wants to compare. Numbers are just the start. I 
suppose you'd also want "Jan" to be put before "Feb". And "31.12.2009" 
before "01.01.2010". :-) The latter is usually solved by writing dates 
in ISO format, i.e. 2009-12-31 and 2010-01-01, because this way the 
simple lexicographical sorting does the trick.

2.) Lexicographical sorting is way faster than natural sorting because 
the comparison operation is much cheaper.

The main reason really is the first one. Developers are lazy. ;-)


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20100322/59b081f6/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list