Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result

From: Christian Couder <hidden>
Date: 2016-06-15 22:59:11

On Thu, Nov 7, 2013 at 1:12 AM, Junio C Hamano [off-list ref] wrote:
Jonathan Nieder [off-list ref] writes:
quoted
quoted
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.
Ok, I will have a look.
quoted
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.
Yeah, but I will pass on this one.

Thanks,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help