Closed Ichimonji10 closed 5 years ago
I understand, of course, that it's a common convention, and even vim uses a leading "v", so you use your best judgment. :smile:
Does this cause any problems with any existing tooling? I agree it's kind of redundant, and I wasn't even consistently using a prefix previously, but I don't think there's much point in breaking peoples' plugin manager tag references or adding duplicate version tags without a prefix.
My use case is packaging jellybeans for installation with a package manager. Dropping the leading "v" would make the packaging code marginally cleaner. There's certainly value in consistency with the current approach, though. As much as anything else, I'm hoping to raise awareness of how this detail affects ease of distribution.
Ok, I'll continue with the current tagging scheme for jellybeans and keep this in mind when starting future projects.
Version numbers are prefixed by a leading character, "v". This practice is pointless, breaks with existing conventions, and makes implementing version comparison logic harder.
It's pointless because an entity (such as a person or a program) that's examining a version number already knows that the string they're looking at is a version number. The leading "v" doesn't help them figure out that the string they're looking at is a version number - they already knew that.
It breaks with conventions like PEP 440 and semver. PEP 440 specifies that a leading "v" character should be discarded. And semver makes no use of a leading "v" character.
To understand why it makes implementing version comparison logic harder, consider how each additional allowable string (like "alpha," "beta," and "rc") push one further from the simple case of splitting a version string on dots, casting each segment to an integer, and comparing segments from left to right.