On Oct 20, 2015, at 12:31 PM, Paul Eggert <egg...@cs.ucla.edu> wrote:
> Pádraig Brady wrote: > >> If a limit, then 0 naturally implies no limit. If a length, then 0 is >> meaningless. > > It's not meaningless. It means length 0. Length -1 would be meaningless. I'm entirely indifferent between using 0 and using -1, except to the extent that there's any significant precedent for one over the other in existing tools. > That being said, I'm tired of fighting this issue, so please feel free to go > ahead and have 0 mean infinity to the user. But surely this can be done > better than to have SIZE_MAX mean infinity internally. Just use 0 to mean > infinity; that's less confusing, if that's what 0 means externally. In other > words, use SIZE_MAX to stand only for itself, and use 0 to stand for infinity. Yes, external consistency, internal consistency, and internal-external consistency are all valuable.