Search code examples
versioningsemantics

What are the individual segments in a version number called?


The following version number 4.10.9.7 is segmented into four pieces. What is the word for one of those segments? If one was to use it in a sentence, one might say,

A version number is comprised of one or more ___


Solution

  • Semver

    The most common term comes from the semver spec, which uses identifier:

    Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows

    https://semver.org/

    So,

    A version number is comprised of one or more identifiers

    Package managers

    Package managers don't universally agree on terminology, but it seems either following semver and using "identifer" or the general term "parts" is the norm.

    NPM follows semver and also uses the term identifer.

    Golang does the same, though the code itself shortens it to "Ident".

    PIP just calls them parts. Perhaps a bit on the nose, but it gets the job done.

    Ruby is the same as pip, calling them parts.

    Conclusion

    Five years after asking this question, I have found myself referring to them the way I do in the original question: as segments.

    A version number is comprised of one or more segments

    I think any term that gets across the intent is good enough for the job. I like "segments" since that implies the parts are both contiguous and only a section of the whole.

    However, if it important to stay consistent with the semver standard, the term that should be used is identifier.