7 ms·
v0.8 < v0.10 < ... < v0.80. God damn math.
by 1SaltwaterC 14y ago
v0.8 < v0.10 < ... < v0.80. God damn math.
- homeomorphic 14y agoIt's not meant to be a decimal number. A version number is a sequence of natural numbers ordered lexicographically.
- 1SaltwaterC 14y agoDo you have _any_ standard to back up that claim or you're pulling that out of nowhere like the rest of the down-voter crowd? Besides, in the node.js community the semantic versioning is accepted as standard. npm is the default tool for managing packages. For reference: http://semver.org/ http://semver.org/
- homeomorphic 14y agoThe claim that version numbers aren't the same as decimal expansions of real numbers? Yes, well, the link you just provided gives evidence for that. I'm not familiar with semantic versioning, but as far as I can tell, one element of it is version numbers being triples of natural numbers. Well then, at least in the case you're talking about, version numbers aren't the same as decimal expansions of real numbers. In general, I would argue version numbers are sequences of natural numbers ordered lexicographically. That means they're not the same as decimal expansions of real numbers.
- 1SaltwaterC 14y agoIf you look at my comparison, you can see that it isn't a decimal number. I said (dropping the v prefix, that may bee to subtle for HN): 0.8 < 0.10 < 0.80. In decimal that would be: 0.8 < 0.1 < 0.8 - the comparison doesn't work this way (duh). But it isn't lexicographic sorting either. This sequence: 0.8, 0.80, 0.2, 0.20 has this lexicographic order: 0.2, 0.20, 0.8, 0.80, while a proper version ordering is to compare the stuff after the dot aka 2 < 8 < 20 < 80.