Created attachment 499972 [details, diff] Patch introduces suggested nomenclature. In the Version Specifications section, although the regular expression makes the meaning clear, the supporting text uses the term "positive integer" to refer to numeric version components. This terminology precludes zero as a valid component, which is clearly incorrect. Suggested replacement term: "non-negative integer". The supplied patch was produced against commit 36ac2950e13dabe42f7c6fede7cda1beca4e6302.
Certainly "non-negative integer" is mathematically correct, but IMHO it is an awkward wording in the given context, especially when the term would occur four times. How about "natural number" instead?
Maybe "unsigned integer" catches the intention even better, as a "non-negative integer" or a "natural number" could still include a plus sign.
'Natural number' is an ambiguous term. People use it both ways.
Created attachment 500802 [details, diff] Straighten out specification of integer version components. Alternative patch, using the term "unsigned integer". Rationale: - "Positive integer" (what we have currently) is clearly wrong because zero is not a positive number. - "Non-negative integer": This may still include a plus sign which is not permitted in a version specification. - "Natural number": As has been pointed out, some define these to start with 1, so the term is ambiguous. (And again, it doesn't exclude the plus sign.) - "Digit sequence": In most definitions I've found, a sequence can be empty, and "non-empty digit sequence" would be clumsy.
I think the regular expression provides the appropriate constraints; I just didn't want the text to contradict the regular expression. I think either one (non-negative or unsigned) works. I prefer the former but I also think that the appropriate amount of debate over this minor issue has probably occurred. Thanks for your attention.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/pms.git/commit/?id=0a2577bd7ac038a2b6849a40bc0a05fe3d535bd5 commit 0a2577bd7ac038a2b6849a40bc0a05fe3d535bd5 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2017-10-29 11:22:14 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2017-10-29 11:22:14 +0000 Straighten out specification of integer version components. Reported-by: John R. Graham <john_r_graham@gentoo.org> Closes: https://bugs.gentoo.org/635340 names.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Thanks, Ulrich. :)
*** Bug 474080 has been marked as a duplicate of this bug. ***