question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Ordinal" versus "Priority" is confusing

See original GitHub issue

Describe the bug

For ConfigSource we talk about “ordinal”, which is a word that means “relating to position in a series”, for example (first, second, third, etc.). For other things we use “priority” (and the @Priority annotation). This is very confusing because when we talk about ordinals in language, the thing that is first is first, but we’re now treating ConfigSource ordinality the reverse way: higher (or later) ordinals take effect over lower (or earlier) ordinals.

We should change all specification language referring to “ordinal” to say “priority” instead. We should also look into using @Priority for ConfigSource by default (possibly as a follow-up issue).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
radcortezcommented, Apr 7, 2020

The pain point here will be the ConfigSource#getOrdinal method.

0reactions
Emily-Jiangcommented, Oct 14, 2021

The above statement is only about invocation order not about which wins. In CDI spec: https://jakarta.ee/specifications/cdi/3.0/jakarta-cdi-spec-3.0.html#unsatisfied_and_ambig_dependencies

All the beans left are alternatives with a priority, or producer methods or fields of beans that are alternatives with a priority, then the container will determine the highest priority value, and eliminate all beans, except for alternatives with the highest priority and producer methods and fields of alternatives with the highest priority value. If there is exactly one bean remaining, the container will select this bean, and the ambiguous dependency is called resolvable.

It clearly specifies the highest priority wins, which is the behaviour we are having here as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ordinal data - Wikipedia
Not to be confused with Ordinal Scale (movie). Ordinal data is a categorical, statistical data type where the variables have natural, ... It...
Read more >
Respondents ranked priority in management objectives, on an ...
Respondents ranked priority in management objectives, on an ordinal scale where 1 = lowest priority and 10 = highest priority. Source publication.
Read more >
Cardinal Numbers vs. Ordinal Numbers – What's the Difference?
In summary, ordinal means order, while cardinal means quantity. Don't undermine your credibility over a poor choice of words. Be sure to use...
Read more >
Nomenclature at the Ordinal and Higher Levels - JSTOR
necessity for recognition of priority, rejection of homonymy, ... 1983 ORDINAL AND HIGHER-LEVEL NOMENCLATURE 35 ... extreme confusion for a long time.
Read more >
Are ordinal variables categorical or quantitative? - Scribbr
In statistics, ordinal and nominal variables are both considered categorical variables. Even though ordinal data can sometimes be numerical, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found