[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: master 71783e9: Add the string-numeric-lessp function
From: |
Stephan Mueller |
Subject: |
RE: master 71783e9: Add the string-numeric-lessp function |
Date: |
Sun, 21 Feb 2016 06:15:59 +0000 |
Lars Ingebrigtsen <address@hidden> writes:
" The code almost got simpler, even. `string-numeric-lessp' now reverts
" to calling `string-lessp' if any of the embedded numbers overflow
" size_t. I think that should be OK for any real world usages... I mean,
" even that could be fixed if we want to be really picky, but I'm not sure
" it's worth it.
" (The fix would be: If the numerical stretches are of unequal length,
" then obviously the shorter one is smaller than the longer. If they're
" of equal length, then we can just compare the numerical stretches
" lexicographically. So we don't really really need to convert anything
" to numbers, anyway...)
Given you're in the code anyway, and have the fix worked out, I'd
be inclined to make the fix. But the fix might need a fix: what if the
longer one starts with zeros?
stephan();
Re: master 71783e9: Add the string-numeric-lessp function, Paul Eggert, 2016/02/21
Re: master 71783e9: Add the string-numeric-lessp function, Lars Ingebrigtsen, 2016/02/21