Ordering of versions
cowwoc
cowwoc at bbs.darktech.org
Mon Nov 14 16:48:01 PST 2011
On 14/11/2011 6:14 PM, Brian Pontarelli [via jigsaw-dev] wrote:
> Just to be clear, I wasn't stating that multiple version schemes
> should not be supported. I was stating that the default, which will
> cover 99% or more of cases, should be simple and well defined.
Here is a default we can all identify with :)
public final class NaturalOrdering<T extends Comparable<T>> implements
Comparator<T>
{
@Override
public int compare(T left, T right)
{
if (right == null)
throw new NullPointerException("right may not be null");
if (left == right)
return 0;
return left.compareTo(right);
}
}
> However, I still don't think that a system that encourages multiple
> version schemes is a good idea. I think this will end up causing
> massive confusion and annoyance. I think the ability to have a custom
> version scheme should be there, but only used if absolutely necessary
> (read "rarely").
People are already using multiple version schemes today and
programming tools, by and large, allow it. Allowing developers to
continue using custom schemes will not make the world any more chaotic
than it already is. This is a subjective matter and as such there is no
"right answer". That's one of the things that rubs me the wrong way
about Maven. They assume that there is a "right way" of doing everything
and if you fall into the "wrong way" category using their system is a
virtual hell. Project Jigsaw should be inclusive on these kinds of
subjective matters.
PS: I don't see why arbitrary versioning schemes would complicate life
for end-users. They specify a dependency on FooLib 1.0.5+ and it's up to
the system to figure out what "greater than" means in this case. The
whole thing is quite transparent to end-users.
Gili
--
View this message in context: http://jigsaw-dev.1059479.n5.nabble.com/Ordering-of-versions-tp4970773p4993029.html
Sent from the jigsaw-dev mailing list archive at Nabble.com.
More information about the jigsaw-dev
mailing list