Invalid example in 2.0.0 clause 9 #313

Closed
opened 2026-02-17 11:50:05 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @hleeanexinet on GitHub (Jan 31, 2018).

The clause 9 says: "Numeric identifiers MUST NOT include leading zeroes."

Then, in the example "1.0.0-0.3.7" in the same clause, what's the 0 right after the hyphen?

Originally created by @hleeanexinet on GitHub (Jan 31, 2018). The clause 9 says: "Numeric identifiers MUST NOT include leading zeroes." Then, in the example "1.0.0-0.3.7" in the same clause, what's the 0 right after the hyphen?
Author
Owner

@hleeanexinet commented on GitHub (Jan 31, 2018):

OK, it's not a leading zero. Leading zero has to be followed by a non-zero digit.

https://en.wikipedia.org/wiki/Leading_zero

@hleeanexinet commented on GitHub (Jan 31, 2018): OK, it's not a leading zero. Leading zero has to be followed by a non-zero digit. https://en.wikipedia.org/wiki/Leading_zero
Author
Owner

@RichardDavies commented on GitHub (Feb 8, 2018):

I had the exact same thought as I read the spec! After studying it, it became clear to me what the author meant, but the term "leading zero" is somewhat ambiguous as the technical definition differs slightly from the natural "semantic definition" conveyed by the words (i.e. a leading zero is any zero that appears as the first character before other characters).

It's obvious that we're not the only ones to make this incorrect assumption so maybe the spec should clearly define that term or link to the definition of "leading zero" whenever that term is used.

@RichardDavies commented on GitHub (Feb 8, 2018): I had the exact same thought as I read the spec! After studying it, it became clear to me what the author meant, but the term "leading zero" is somewhat ambiguous as the technical definition differs slightly from the natural "semantic definition" conveyed by the words (i.e. a leading zero is any zero that appears as the first character before other characters). It's obvious that [we're not the only ones to make this incorrect assumption](https://github.com/semver/semver/issues/348) so maybe the spec should clearly define that term or link to the definition of "leading zero" whenever that term is used.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#313