Here's my take on it. I might be completely wrong, but as you are asking for rationale, this is how I see version numbers and their use.
Version numbers are not actually numbers, they are really just identifiers with some semantics and comparison logic based on that semantics.
Part of that logic is being able to check whether two versions are compatible.
In that sense, 2.0
represents any 2.0
derivative, or 2.0.*.*
.
When you use relational operators with versions, you actually want to answer the compatibility question, where >=
means something like is backwards compatible with
.
So, V1 >= V2
would mean is V1 backwards compatible with V2
.
2.0.0.0 >= 2.0.*.*
-> true, as 2.0.0.0
should be able to run on system supporting claiming to support 2.0.*.*
2.0.*.* >= 2.0.0.0
-> false, as not every 2.0.*.*
version is guaranteed to be compatible with 2.0.0.0
[EDIT: answering the comment]
shouldn't then 2.0.*.*
at least be equal to 2.0.0.0
? Because (in your words) "2.0.0.0
should be able to run on system supporting claiming to support 2.0.*.*
"
I think what's confusing you is that we picked 2.0.0.0
which is intuitivelly understood as base version, thus logically equivalent to 2.0.*.*
, but it isn't.
It shouldn't be equal, as 2.0.*.*
means any 2.0 version (not just specific one that was picked), thus ANY_20_VERSION == 2000_VERSION
is false. In other words, this would mean that any 2.0
derivative should be able to satisfy the relation (not just specific one that was picked), and obviously 2.0.0.1
is not same as 2.0.0.0