@Mark you proved it is 1-1 with your example. If we use number both
ways have the same issue. It is common to use string as well and
tolerate before("application"), after("other source") etc...but I
guess having numbers to start is good enough. Then I prefer the most
prioritized is 0 but since we have @Priority we should stick to it IMORomain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-12-28 16:32 GMT+01:00 Anatole Tresch <[email protected]>: > Also confusing sometimes is that with overrriding higher priority sources > are added later, since they override others... > > ... > > Mark Struberg <[email protected]> schrieb am Sun Dec 28 2014 at 16:23:20: > >> Anatole, you've never heard "what's your no 1 priority right now?" >> >> priority is the order in which things get done. >> prio 1 : do it now >> prio 2 : do it after 1 >> prio 3 : do it after 2 >> etc >> >> but how do you add something IN FRONT? Something which is even higher prio >> than 1? >> >> >> >> I don't care that much about how we call it. But if we keep magic numbers >> than I really do care that higher values mean 'more important'. >> >> If you like 'priority' better than 'ordinal' we could also go with the >> @Priority annotation. >> >> >> >> LieGrue, >> strub >> >> >> >> >> >> > On Sunday, 28 December 2014, 16:15, Anatole Tresch <[email protected]> >> wrote: >> > > For less numeric values means less priority as well... >> > >> > Mark Struberg <[email protected]> schrieb am Sun Dec 28 2014 at >> 15:40:09: >> > >> >> We should get a common understanding which of those 2 different >> approaches >> >> we should take. >> >> My main concern is that it should be clear as glass for the user what >> he >> >> gets. >> >> >> >> What has a higher priority? 1, 2, or 3 ? >> >> Imo the highes priority is always 1. But then it's really hard to add a >> >> more important priority. >> >> >> >> We've discussed this to some extent in OpenWebBeans where I first >> >> implemented this mechanism in 2009 (see PropertyLoader). And back then >> we >> >> decided to not use 'priority' but 'ordinal'. Because the >> > higher the ordinal >> >> (math) the more important something is. >> >> That way it is really easy to add a ConfigSource which is 'even more >> >> important' and thus tweak the effective configuration. >> >> >> >> What do others think about those 2 approaches? >> >> >> >> >> >> LieGrue, >> >> strub >> >> >> > >>
