This is also an example of how difficult naming can be. This is arguably a "ranking" (1=low, 5=high), not a "priority" (1=high, 5=low).
Re:My Favourite Diff
by adrianmsmith on Monday April 06, 2020 @04:47AM
(#22791908)
That’s a very good point.
However people say things are “high priority” which, at least to my mind, implies higher numbers, so I don’t think ”priority” is necessarily the wrong term here.
Re:My Favourite Diff
by andrey_utkin on Monday April 06, 2020 @05:47AM
(#22792153)
right, and you execute tasks in descending priority order, not just the priority order.
> “order by priority” reads so well in English
I had my suspicions that programming reads very different to native speakers, and I guess here's a case when it's better to have English as a second language: I heard a ding-a-ling in my head immediately upon seeing the absence of ‘desc’.
It was absolutely my mistake, but “order by priority” reads so well in English, so my eye just couldn’t see the mistake.
I mean I’d been programming for decades at that point, I knew the syntax, I know our data model, I stared at the code and I still couldn’t see it. (Eventually I did see it of course..)
Since then I’ve been of the belief it would be better if SQL forced you to put “asc” or “desc” when using “order by”. Then you’d be forced to think about it.
So I was agreeing with the previous poster, who said that defaults aren’t always a good idea.