Re: Sort Order in KDE-PIM

Ingo Klöcker <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
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

_______________________________________________
KDE PIM users mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-users
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iEYEABECAAYFAkun1AoACgkQGnR+RTDgudhwOwCfToFBA9261I5+vinbwhw5LzuW
swMAn1gxkK4iSF+lBQTu2TULQbrXdFHZ
=qBzP
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.