~ is actually useful #9

Closed
opened 2026-02-17 11:01:56 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @anarcat on GitHub (Jan 7, 2012).

I see that ~ was removed as a separator, but i think it has its uses. It's actually what Debian uses to mark release candidates as being "lower" than the real release. In fact, it makes the whole thing semantically easier to compare.

Consider: a.b.c > a.b, as a general case. If we say that "dot" can separate "release candidates" strings, then this is not true if c is "rc1", for example (1.0.rc1 < 1.0), breaking the general case (for that matter, 1.0.rc1 > 1.0.0).

So I think that ~ serves a purpose and should be brought back in, which would also mean that this would be compatible with the Debian versionning.

For more information about Debian version numbers and the way they are compared, see: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

Originally created by @anarcat on GitHub (Jan 7, 2012). I see that ~ was removed as a separator, but i think it has its uses. It's actually what Debian uses to mark release candidates as being "lower" than the real release. In fact, it makes the whole thing semantically easier to compare. Consider: a.b.c > a.b, as a general case. If we say that "dot" can separate "release candidates" strings, then this is not true if c is "rc1", for example (1.0.rc1 < 1.0), breaking the general case (for that matter, 1.0.rc1 > 1.0.0). So I think that ~ serves a purpose and should be brought back in, which would also mean that this would be compatible with the Debian versionning. For more information about Debian version numbers and the way they are compared, see: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
Author
Owner

@timmc commented on GitHub (Jan 21, 2012):

"~" was replaced with "-", not ".". That can be compared programmatically.

@timmc commented on GitHub (Jan 21, 2012): "~" was replaced with "-", not ".". That can be compared programmatically.
Author
Owner

@anarcat commented on GitHub (Jan 23, 2012):

I see, then it's not so bad! :) I still think it's unfortunate to needlessly diverge from an existing policy (Debian's), it would have been very useful for porters as they could have used the semver versions directly.

In Debian dash ("-") is more like semver's plus sign ("+"), which is also allowed.

@anarcat commented on GitHub (Jan 23, 2012): I see, then it's not so bad! :) I still think it's unfortunate to needlessly diverge from an existing policy (Debian's), it would have been very useful for porters as they could have used the semver versions directly. In Debian dash ("-") is more like semver's plus sign ("+"), which is also allowed.
Author
Owner

@mojombo commented on GitHub (Feb 26, 2012):

I don't like Debian's versioning paradigm. It's overly complex. If you re-read the spec, I think you'll see that it covers how to compare versions very explicitly and with a small number of easy to understand rules.

In addition, Git tags cannot contain the tilde character, making it badly suited to modern development.

@mojombo commented on GitHub (Feb 26, 2012): I don't like Debian's versioning paradigm. It's overly complex. If you re-read the spec, I think you'll see that it covers how to compare versions very explicitly and with a small number of easy to understand rules. In addition, Git tags cannot contain the tilde character, making it badly suited to modern development.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#9