develooper Front page | perl.module-authors | Postings from April 2019

Re: [RFC] File::TVShow::Parse

Thread Previous | Thread Next
From:
David Cantrell
Date:
April 15, 2019 18:05
Subject:
Re: [RFC] File::TVShow::Parse
Message ID:
20190415174601.GA27829@bytemark.barnyard.co.uk
On Mon, Apr 15, 2019 at 12:04:24PM -0400, Dan Book wrote:

> As a side note, remember that the X.Y.Z form of versions (with more than
> one decimal point) is a sequence of integers ...

Sadly it's worse than that.

There exists popular software management software out there written by
idiots who think that 3.0014 > 3.1, so that rule applies even when
you're using numbers in the form X.Y with a single decimal point. Those
people did a lot of hard work to break numeric comparisons, one of the
few things that computers are any good at.

To work around their deliberate bug you need to keep the non-integer
part of your version numbers the same length, always. So use the strings
"3.0014" and "3.1000" instead of the numbers 3.0014 and 3.1 if you want
to use non-integers.

Or just use integers.

-- 
David Cantrell | Minister for Arbitrary Justice

   The voices said it's a good day to clean my weapons

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About