mirror of
https://github.com/semver/semver.git
synced 2026-07-11 04:52:47 -05:00
Symplify naming of the basic identifiers in the BNF grammar #617
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zafarkhaja on GitHub (Jan 13, 2024).
According to the BNF grammar there are 3 basic types of identifiers: alphanumeric, numeric and "digital". The symbols are named as
<alphanumeric identifier>,<numeric identifier>anddigital id... no, just<digits>, respectively. So maybe, for the sake of brevity and consistency, we should rename the first two to justalphanumericsandnumerics?This is what it would look like as a result
@ghost commented on GitHub (Jun 10, 2024):
This was not me please track and remove these people
@myfonj commented on GitHub (Apr 9, 2025):
I'm not sure about either of your claims:
Can you point to some source? How are they defined actually? Does
alphanumeric[s]enforce mix of letters and digits? Does it tell anything about leading zeroes? Or hyphens? I am afraid you are referring to some "advanced" flavour, or specific implementation (?) and implicating that would potentially lead to confusion.This seems to be effectively quite far from what the current BNF tells:
BNF (fragment)
This (IIUC) allows pre-release (the part after the
-hyphen) to be010, but not001. (Interestingly, it also allows it to be---; making0.0.0--and0.0.0-00-valid SemVer 2.0.0)Would your proposed simplification preserve that? Or do you suggest relaxing it further in the spec?