[squeak-dev] Re: 1.0 not a valid VersionNumber?
Stephen Pair
stephen at pairhome.net
Wed Apr 9 18:54:44 UTC 2008
On Wed, Apr 9, 2008 at 1:49 PM, Andreas Raab <andreas.raab at gmx.de> wrote:
> Stephen Pair wrote:
>
> > Simplified example. The real version number I'm interested in looks
> > like "1.0.34". But it looks like VersionNumber is a no-go for me
> > anyway as you can't even compare, e.g., '1.1.1' asVersion <= '1.2.3'
> > asVersion. Does anyone actually use VersionNumber? I must be missing
> > the real use cases for it.
> >
> >
> > I'm curious whether you'd expect this to return true or false (I'm guess
> > true). The reason it refuses that compasion is that #< is meant to test
> > whether a given version number is an ancestor of another. If you want the
> > stringish comparison behavior, you could just use string.
> >
>
> I wish...
>
> '1.1.2' < '1.12.3'
>
> => false
Did you actually mean true? (if not, I don't actually get what you're
after)...VersionNumber aside, I wonder what you could reasonably infer from
answer answer of true given for '1.1.2' < '1.12.3' ...I don't think you
could infer that 1.12.3 was published after 1.1.2 for example. I don't
think you could infer that 1.12.3 includes everything in included in 1.1.2
(i.e. that 1.12.3 is derived from 1.1.2). About all you could infer is that
1 < 12.
- Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080409/8c537c75/attachment.htm
More information about the Squeak-dev
mailing list
|