[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg doing wrong math (0.09 = 0.9) ?-



pe, 2006-08-11 kello 09:47 +0100, martin f krafft kirjoitti:
> also sprach Adam Borowski <kilobyte@angband.pl> [2006.08.11.0931 +0100]:
> > Uhm, where does the "0" come from?  This is grossly unintuitive, and I would
> > consider this a bug.  Both strings parse as follows:
> > 
> > "1."  => "", 1, "."
> > "1.0" => "", 1, ".", 0
> 
> actually, you forgot the trailing ""
> 
> > And another bug: "2a.0" is _lesser_ than "2.0"!  This works as
> > documented, but is totally against lexicography, expectations and
> > common sense.
> 
> I'll shoot anyone who uses such a version number. :)

Indeed. I think the best lesson from this thread is that as long as
version numbers are simple and sensible (number, period, number,
period, ..., and no numbers have leading zeroes), everything usually
works without surprises. If version numbers become more complicated than
that, there will be surprises, and sometimes nasty ones.

At least we rarely see, these days, upstream version numbers that are
successive negative powers of 10 (0.1, 0.01, 0.001, 0.0001... where 0.1
< 0.01), or successive negative integers (-1, -2, -3, -4...). Or
successive phone numbers in a certain year's edition of the Helsinki
telephone book (don't ask, I was young and silly).

-- 
Fundamental truth #4: Typing URLs always introduces errors. Always copy
+paste.



Reply to: