From: Junio C Hamano Date: Thu, 07 Nov 2013 00:12:51 GMT Subject: Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result Message-ID: In-Reply-To: <20131106221735.GB10302@google.com> Jonathan Nieder writes: >> The old name followed the pattern anything-cmp(), which suggests >> a general comparison function suitable for e.g. sorting objects. >> But this was not the case for suffixcmp(). > > It's not clear to me that prefixcmp() is usable for sorting objects, > either. Shouldn't it get the same treatment? Sounds like a plan for a good follow-up series. > If some day we invent a type for 4-byte-aligned object names, it might > make sense to do something similar to hashcmp, distinguishing between > hashcmp for use where ordering is important and something like hash_eq > when checking for equality (since I suspect the latter can be made > faster). Interesting.