stephenbrooks.orgMiscellaneousNegative Version Numbering

Negative Version Numbering

Proposal for use of negative integers to indicate development/beta status in software version numbering.

- - - [Description] - - -

The hierachical version numbering as a sequence of non-negative integers (e.g. version 1.0 or 2.4.3) is a good fit for software that is released to the public, however developers and people in various stages of testing require subdivisions of a version that come before a major (or significant minor) release.  I have seen various ways of doing this, for instance a program with "version 5 beta 2" being represented by version 4.9.2 with the idea that 9 is the "last" one-digit number.  This made me think of what I believe to be a more flexible system, by allowing negative integers in the parts of the version numbering.

Make the assignments
−1 = RC (Release Candidate)
−2 = beta
−3 = alpha
−4 = dev (development version).

Now note that the beta before version 5.0 can be written as 5.beta (i.e. 5.−2) and this would be ordered before the full version naturally, without impairing the number of minor versions (4.8, 4.9, 4.10...) of the existing release that are possible.  The beta and other stages may be split appropriately, for example 5.beta.2 (5.−2.2) for the second beta.  Development versions may have as much detail as necessary, e.g. for the 15th build after the 4th development milestone has been achieved going towards version 5. Finally, pre-release stages may be used on minor versions, for instance while a stable version 4.2.3 exists, version 4.3.alpha.1 may be in testing, the latter ordering after 4.2.n but before 4.3.n for non-negative n.

- - - [Compatibility with Legacy Systems] - - -

Some versioning schemes already in use will not allow negative numbers.  For instance, trying to put the version 4.46.−4.1 (4.46 development build 1) into the Windows installer XML toolkit gives the following error.

error CNDL0108 : The Product/@Version attribute's value, '4.46.-4.1', is not a valid version.   Legal version values should look like 'x.x.x.x' where x is an integer from 0 to 65534.
error CNDL0010 : The Product/@Version attribute was not found; it is required.

Various hacks are possible to keep the versions in the correct order while still conceptually using the negative version numbering scheme.  One way is to label the above version 4.45.9996.1 by "carrying 10000" from the second number.  In situations where only three version numbers are allowed, the more compact notation 4.45.9601 could be used, provided that no more than 99 development builds, or alpha versions etc. will be made!

: contact : - - -
E-mail: sbstrudel characterstephenbrooks.orgTwitter: stephenjbrooksMastodon: strudel charactersjbstrudel RSS feed24.95millionaccesses