[squeak-dev] VersionNumber disallows zeros.

Marcel Taeumel marcel.taeumel at hpi.de
Thu Sep 21 06:43:57 UTC 2017

Hi Tobias,

I see several issues with the current implementation of VersionNumber. :)

- You cannot compare 4.1 to 3.1 because such branches are treated unordered.
- You cannot even compare 4.1.1 to 4.2.1 for the same reason. But you can compare 4.1 to 4.2 though.

This logic might be the reason to throw out the zero all together: 4.1 and 4.1.0 are not so different, yet the first will be comparable but the second will not. That "branch logic" seems to be the key. Try changing #initializeNumbers: to accept zero and then play around with the comparison logic.

It's kind of weird or at least incomprehensible. I cannot find useful comments either. 

Am 20.09.2017 20:34:36 schrieb Tobias Pape <das.linux at gmx.de>:

what's the rationale of VersionNumber prohibiting zeros in any of the version parts?
Eg, 4.0.3 is not a valid VersionNumber currently.

Best regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170921/ccca7192/attachment.html>

More information about the Squeak-dev mailing list