6 ms·
If you define your version numbers to be numbers, then your version numbers will be numbers. I really don't get the confusion over this.
by tuwtuwtuwtuw 5y ago
If you define your version numbers to be numbers, then your version numbers will be numbers. I really don't get the confusion over this.
- Jenk 5y agoThe assumptions/traits/expectations that come with numbers (and most importantly, that are embedded into the number _types_) may not be consistent with _version number_ types.
- tuwtuwtuwtuw 5y ago
- Jenk 5y agoI think you need to read the thread again. The point (there is just one) I've made in both replies has been very clear and direct.
- tuwtuwtuwtuw 5y ago
- Jenk 5y ago
- Spivak 5y agoI mean if your standard for “numbers” is “can be mapped 1-1 to integers” then everything is a number. The operations you actually do to numbers have to have meaning in the space you’re defining. Does “1.2.0” + “2.3.0” make sense in your world? And if you’re like what about ordering and comparisons, then sure, you have a partially ordered set.
- tuwtuwtuwtuw 5y agoI don't get what you're trying to add. If Microsoft defined their version numbers as an integer then it's an integer value. They didn't define it as say "1.2.0" so not sure what that has to do with anything.
- Robin_Message 5y agoDates can be very meaningfully and sensibly converted to/from a numeric representation, yet the addition of two dates doesn't make sense, so I don't think not bring able to add versions holds. And not everything can be mapped 1-1 with the integers; reals for example, and therefore arbitrary strings. (Of course, that's only theoretically; with a limited string length you can obviously manage) You're right that the ordering is the key feature of a version representation; munging it into an integer gives you that for free but risks getting to overflow quite easily (as in this case). I guess the conclusion is, use a language like Rust or Ruby when you can define ordering easily on structured data.
- tomjakubowski 5y agosomebody better tell Cantor...