Currently we have 2 attributes for version identification: name and timestamp. The name is used for cosmetic purposes; displaying in the UI etc., while the timestamp is used for ordering.
Now, the question is: how should versions be referenced internally? The available options are:
- Using the name
- Using the timestamp
- Using a new attribute; ID
Using name means internal systems need to be able to handle pretty much anything for the version string, including escaping of the name when required etc. Name can also change, even though it really shouldn't (for example if there was an error when first entering the version name).
Using timestamp means the internal systems don't need to guard themselves as much, the value will always be a fixed width integer. The timestamp to can change though, for the same reason as with the name. Additionally it is harder to memorize than the name.
Adding the new attribute, named ID. It would not be used for sorting, thus not need to change. It would also be an integer, thus more efficient to handle with less required guards against weird values. It would still be hard to remember though, and also add yet another attribute.
I prefer using the name - it is a version name and most things have a decent version names. This is what the user sees and knows.
Same for a separate ID. Why exactly do you need more than one ID? There will be a few weird mods that will have to be assigned version names because the author failed to do so... but I don't see that as a problem.
Considering future extensibility:
Let's start with just the ID for identification.
If we ever need a 'name' just for the looks in the future, it can be added. I would rather avoid it though.
The timestamp should be cosmetic / used for sorting where no explicit order is established.
Sorting by timestamp is actually a workaround for derpy version numbers and neither cover the case where you have parallel branches - think stable vs. develop versions of MultiMC. So, that's maybe a separate concern that should be looked at. I'd like to use this wonko system for MultiMC updates at some point...