Peter da Silva wrote:
On 2008-01-15, at 10:43, Smylers wrote:
So if in all contexts where Perl knows it's dealing with a version
number it suddenly started interpreting 1.8 as a sequence of integers it
would break code which has been running fine for years presuming that
1.8 > 1.75. That would've been hateful.
The correct thing to do would have been to issue a warning when seeing a
version number that might be interpreted as a floating point number, and
make that an error when comparing version numbers to floating point
numbers.
That would make a project "upgrading" (or downgrading) to version objects
impossible -- or at least really noisy -- thus effectively killing the
version.pm project. I've seen a lot of projects filled with self-hate, but
not enough to strange themselves in the crib.
Although thinking about it, since version numbers only make sense within the
same project, and since one shouldn't switch back and forth between decimals
and versions, and since one is already inclined to think that 1.80 < 1.90.0
they should have just gone ahead and had decimals compare to versions as if
they were versions. So that X.YY is the same as X.YY.0 for purposes of
comparison.
FWIW version.pm did at least think about and document the conversion process.
--
60. “The Giant Space Ants” are not at the top of my chain of command.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.com/?page_id=3