[vlc-devel] [PATCH 1/2] core: added sort by date (prepare for playlist fix)

Wilawar chrcnt7 at swift-mail.com
Thu Dec 8 17:41:01 CET 2016

This is a reworked version of my previous message.

> When I was writing this code, I was wondering if a rework of the underlying
> sorting algorithm would make sense.
> Using a stable sorting algorithm would allow the user to choose how he want
> to sort equal entries in one property. This way, all the extra handling of
> equal elements can be removed.
> For example when you would like to sort based on Artist, Date, Album,
> Title, you would click the column headers in reverse order (Title, Album,
> Date, Artist).

Well, if you think users wouldn’t ask why the heck they would have to click column headers in reverse to the
relevance they have to them, just to make them appear in the way they would like them to be, and if
you further disregarded the problem that new items couldn’t be put into place automatically if the implementation
didn’t track all sort commands that don’t cancel each other (which might be almost all previous sort operations),
then sure, your proposal would make for a nice insider trick (but not much more). ;)
By the way, I already noticed that this proposal would require clicking in reverse to the order of thinking before
I read about it in your message, so to me this seems like a very obvious problem.

In general, it’s certainly desirable to have items sorted by multiple rules acting in priority order; yet it’s seldomly seen in other programs, so it would be guaranteed to give a good impression to everyone who notices.
However, I know I won’t work on this in the forseeable future, so you might have to implement this yourself or
convince someone else to do it. I would also like to call to your attention that – while applying multiple stable
sorting algorithms in reverse order is (mathematically seen) a very elegant solution – in programming,
performance matters and other approaches might be more suitable, such as remembering the ranges which only
have items that have got an equal rank during the last sorting operation.

Now, these were just my two cents while reading at least a few messages from the stale backlog. ;)

http://www.fastmail.com - Access your email from home and the web

More information about the vlc-devel mailing list